embed « Load « JPA Q&A





1. Can a Hibernate Embedded Object be lazy loaded?    stackoverflow.com

I have a Hibernate Entity that have a couple of embedded objects that are quite fat but infrequently used. I'd like to make the embedded objects Lazy Loaded but I ...

2. Embedded object not loading when some fields are NULL    forum.hibernate.org

Using Hibernate 3.5.6 Final. I have a one-to-one containment relationship between Object and ObjectRetirement. ObjectRetirement has a FK to the containing Object and two other non-key, nullable fields (Version and Reason). I just converted the ObjectRetirement class from an Entity to an @Embeddable. When saving the containing Object, the ObjectRetirement table gets properly populated. When calling get() on the Object, the ...

3. @Embedded Objects are set to null when loading.    forum.hibernate.org

I've got the following field: @Embedded private Address address = new Address(); If I create an object, but don't fill in any fields on address, when I restore it, address will be null (instead of having an Address object with all null properties). Is there a way to keep address from being set to null? If it would just leave it ...

4. Embedded-id JPA/Hibernate, loop and stackoverflow loading!    forum.hibernate.org

Lets assume I have the follow, and also assume that it has all the getters and setters and I have overwritten the hashCode and equals methods. Code: @Embeddable public class CarNameKey implements Serializable { private static final long serialVersionUID = -8069585143246555735L; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CAR_ID") ...