>PROBLEM Creating a persistence.xml file having two persistence units caused the following Wildfly’s error message: Caused by: java.lang.IllegalArgumentException: WFLYJPA0061: Persistence unitName was not specified and there are 2 persistence unit definitions in application deployment deployment “todos.war”. Either change the application deployment to have only one persistence unit definition or specify the unitName for each … Read More “WILDFLY/JBOSS: WFLYJPA0061: Persistence unitName was not specified and double persistence unit definitions” »
Tag: jpa
java
database, java
# jpa 2.1 # This anotation allows you to change the behavior of a Lazy entity loading default, in the case the var is the atribute that # will behave like EAGUER when using a query with TypedQuery.setHint(“javax.persistence.loadgraph”, eg); # #theAtributeName: … import javax.persistence.NamedAttributeNode; import javax.persistence.NamedEntityGraph; … @NamedEntityGraph(name=”aNameToCallIt”,attributeNodes={@NamedAttributeNode(“theAtributeName”)}) @Entity @Table(name = “nameoftheTable”) public class ClassName … Read More “JPA: @namedEntityGraph” »