¡@

Home 

java Programming Glossary: entitya

Hibernate generating SQL queries when accessing associated entity's id

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

this getters and setters left out @Entity public class EntityA @ManyToOne fetch FetchType.LAZY @JoinColumn name parent_id private.. FetchMode.SUBSELECT @JoinColumn name parent_id private Set EntityA children @MappedSuperclass public class SuperEntity @Id @GeneratedValue.. @Column name id private long itemId When I query for EntityA it loads fine with the parent association being replaced by..

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.. or even Hibernate directly I need somethign like this FROM EntityA WHERE fieldA 1 UNION FROM EntityB WHERE fieldB aa Any hint .. if you must You can create a POJO to retrieve them class EntityAandEntityB EntityA a EntityB b long idA long idB int fieldA String..