The EntityManager is the representation of a PersistenceContext, allowing a user to manipulate data pulled from a database.
Questions tagged [entitymanager]
1802 questions
0
votes
1 answer
QuerySyntaxException hibernate invalid path on EntityManager createQuery
I am sending from the frontend a value to search on two properties of my entity Producto. That properties are Codigo and Descripcion.
The issue is that when the line TypedQuery typedQuery = em.createQuery(queryCount); hits, this exception is…

Pablo De Luca
- 795
- 3
- 15
- 29
0
votes
0 answers
0
votes
1 answer
EnityManager does not generate delete query
I'm trying to delete an entity but the delete query is not generated and there's no error shown in the console :
@Override
@Transactional
public void removeClassObject(MyClassObject classObject) {
MyClassObject ip =…

OddDev
- 1,521
- 7
- 23
- 45
0
votes
0 answers
@Asynchronous and EntityManager
I have a multi-module JavaEE project where several beans carry methods
findByColumn(String value)
I'd like to factorize all these different findBy* methods in a single super class.
I know the risk of such design is that I could potentially create a…

Maxime Flament
- 721
- 1
- 7
- 24
0
votes
1 answer
org.hibernate.PersistentObjectException: detached entity passed to persist MERGE
I'm having trouble saving data in a @ManyToOne column
I have done research and I figured I need to somehow merge or persist something
but I don't quite get it. I have opened a lot of threads/questions that has been answered but I still can't make it…

jude
- 1
0
votes
1 answer
org.hibernate.PersistentObjectException: detached entity passed to persist @ManyToOne
I'm having trouble saving data in a @ManyToOne column
I have done research and I figured I need to somehow merge or persist something
but I don't quite get it. I have opened a lot of threads/questions that has been answered but I still can't make it…

Mark
- 293
- 1
- 11
- 25
0
votes
2 answers
Symfony Entity Manager Call
I want to know if there's any difference to call Entity manager on a Symfony3 Controller:
$this->getDoctrine()->getManager()
And:
$this->get('doctrine.orm.entity_manager');
Performance?
More Correct?
Thanks so much in advance,
Carl Dev
user5189224
0
votes
1 answer
Why glassfish5 does not deploy my war correctly?
I'm using Eclipse Version: Oxygen.3 Release (4.7.3), Glassfish 5, java version 1.8.0_161, Hibernate 5.2.16 (as JPA implementation) and maven.
I'm coping with the following situation:
test1
I right click on a project in eclipse -> update project ->…

StackUser
- 587
- 6
- 26
0
votes
1 answer
OpenJPA, entityManager in EJB, entities share same sequence
I have several entities in my project, all of them extending this abstract class:
@MappedSuperclass
public abstract class AbstractClass implements Serializable {
public static final String GENERATOR = "default";
…

maqjav
- 2,310
- 3
- 23
- 35
0
votes
1 answer
EntityManagerFactory is null with hibernate osgi and eclipse-bundle using equinox
I m trying to implement hibernate-osgi with Equinox.
I've created a plugin "my.app.hibernate.osgi" from the following jars:
jars of…

Zibus69
- 1
- 2
0
votes
3 answers
JPA - java.lang.IllegalArgumentException: Not an entity: class
I have a weird problem with my Java code.
I am facing the following exception:
java.lang.IllegalArgumentException: Not an entity: class
Note that I have a persistence.xml where my entites are listed.
My entites have @Entity annotation.
When I…

Hejk
- 185
- 3
- 18
0
votes
0 answers
init(ServletConfig config) in webservlet with a entity manager doesnt work
I have a problem with my Webservlet: when I try to initialize my database in NetBeans with an EntityManager in the init(ServletConfig config) method, glassfish says:
Information: /file:/C:/Users/Alina/Documents/Uni/Semester 4/SE…

Alina
- 1
- 2
0
votes
2 answers
No qualifying bean of type 'org.springframework.data.jpa.repository.support.JpaEntityInformation
I'm trying to extend the **SimpleJpaRepository ** by BaseRepository interface and the BaseRepositoryImpl.
Tha BaseRepositoryImpl extends **SimpleJpaRepository ** and implements BaseRepository.
In addition, I have some other Repositories such as…

alonabr11
- 1
- 1
- 4
0
votes
1 answer
Why does 'EntityManager.contains(..)' return false even if an entity is contained in DB?
I used this JPA: check whether an entity object has been persisted or not
to know if i persist or merge my entity , It will look like this :
if (!getEntityManager().contains(entity)) {
System.out.println(" PERSIST ");
}…

Yagami Light
- 1,756
- 4
- 19
- 39
0
votes
1 answer
Symfony3.4 Using two databases in one Application
I try to build an application with symfony 3.4 that access two different databases.
https://symfony.com/doc/3.4/doctrine/multiple_entity_managers.html
In this documentation i see that i had to configure my config.yml like this:
doctrine:
dbal:
…

Margok
- 1
- 1