I have 3 entities with ManyToMany relationships: Role Entity: Permission Entity: Functionality Entity: I did the following: I have created 3 functionalities: Then created 2 permissions: Then created a role: I am getting the following exception: java.lang.IllegalStateException: Multiple representations of the same entity [com.persistence.entity.admin.Functionality#1] are being merged. Detached: [com.persistence.entity.admin.Functionality@4729256a]; Detached: [com.persistence.entity.admin.Functionality@56ed25db] Answer Fixed it by removing CascadeType.MERGE on Permission entity
Tag: ejb-3.0
How can I avoid the Warning “firstResult/maxResults specified with collection fetch; applying in memory!” when using Hibernate?
I’m getting a warning in the Server log “firstResult/maxResults specified with collection fetch; applying in memory!”. However everything working fine. But I don’t want this warning. My code is My query is Answer Reason for this warning is that when fetch join is used, order in result sets is defined only by ID of selected entity (and not by join
EJB 3.0 test client working without maven but not with
here is my problem, I made an EJB with maven and 2 test clients, a test client without maven, only added jnp-client and the EJB to it’s class path, work like a charm a test client using MAVEN, added the EJB through the POM and jnp-client, does not work this is my EJB : it’s POM : this is my