¡@

Home 

java Programming Glossary: entityb

Hibernate generating SQL queries when accessing associated entity's id

http://stackoverflow.com/questions/3736818/hibernate-generating-sql-queries-when-accessing-associated-entitys-id

fetch FetchType.LAZY @JoinColumn name parent_id private EntityB parent @Entity public class EntityB extends SuperEntity @OneToMany.. name parent_id private EntityB parent @Entity public class EntityB extends SuperEntity @OneToMany mappedBy parent @Fetch FetchMode.SUBSELECT.. in my case this generates a SQL statement which fetches EntityB and only then returns the Id. How can I investigate the problem..

Hibernate/JPA: Is it possible to retrieve heterogeneous entities in a single query?

http://stackoverflow.com/questions/7322526/hibernate-jpa-is-it-possible-to-retrieve-heterogeneous-entities-in-a-single-que

entities in a single query I have 2 entities EntityA and EntityB. They are unrelated and I cannot put them in a Inheritance tree.. somethign like this FROM EntityA WHERE fieldA 1 UNION FROM EntityB WHERE fieldB aa Any hint java hibernate jpa orm persistence.. You can create a POJO to retrieve them class EntityAandEntityB EntityA a EntityB b long idA long idB int fieldA String fieldB..