proxy « Fetch « JPA Q&A





1. join fetch not hydrating proxy    forum.hibernate.org

I have a very strange issue where Hibernate isn't hydrating a specific many-to-one relationship. I am using 3.5.5 with annotations. Here are my domain classes (watered down for relevance - e.g., getters/setters not displayed): Code: @Entity @Table(name = "PHYSICIAN") public class Physician extends VersionedPersistentEntity { @OneToMany(mappedBy = "physician") private Set acceptedInsurance; } @Entity @Table(name = "PHYSICIAN_INSURANCE") public ...

2. Query fetching too much, hql, fetch, lazy, proxy    forum.hibernate.org

Hi hib gurus I have a class called message. Message has an id, a parent (an other message) and a smallcontent. Given an id and i small content, I want to retrieve a (unique) grand child which has those properties. This is my query: query.append("select image from com.nmt.msp.resource.SimpleMessageResource as image"); query.append(" join image.parent as parent"); query.append(" join parent.parent as grandparent"); query.append(" ...

3. fetch Objects at once instead of using proxy    forum.hibernate.org

4. proxies vs. lazy fetching    forum.hibernate.org

5. outer-join="true" doesn't fetch proxied object [ma    forum.hibernate.org

Author Message mwinkels Post subject: outer-join="true" doesn't fetch proxied object [ma Posted: Wed Jan 26, 2005 11:17 am Newbie Joined: Wed Jan 26, 2005 11:01 am Posts: 18 I want to eagerly fetch a many-to-one association (Cat->Owner). The documentation (HiA, p.147) says "... So, if we want to reenable eager fetching for the association, now proxying is enabled, we ...

6. Proxied Objects and max_fetch_depth    forum.hibernate.org

Hibernate version: 2.1 and 3.x With the 'use-outer-join' configuration property deprecated by max_fetch_depth, I'm curious as to what effect, if any, this will have on proxied objects. Suppose I have max_fetch_depth=0 with the following mapping snippet: ....... ....... Should I specify outer-join="false" in the many-to-one to have a proxied ...

7. Can a collection with fetch join containing proxy objects?    forum.hibernate.org

Been a while since I posted on the forums, Hibernate's been working great for us, and we've been able to address any issues ourselves. However, once in a blue moon one of our developers will come to me with an interesting behaviour they are seeing. Specifically, some of the objects in a collection attribute loaded using a 'join fetch' throw LazyInitialization ...

8. Double property-proxy fetching bug    forum.hibernate.org

Newbie Joined: Wed Jan 26, 2005 11:01 am Posts: 18 [b]Description[/b] When (a) a persisted class has two associated properties of the same type, (b) that type has a proxy, (c) that type has a complex property, only the first association (alphabetically) is eagerly fetchable. If both have an outer-join="true" setting in the mapping, the second is ignored, leading to lazy ...

9. lazy select fetching lazy proxy fetching    forum.hibernate.org





10. lazy proxy fetching for single-valued associations?    forum.hibernate.org

In order to enable lazy loading in the one to one mapping you need to tell hibernate that the entity in the other end of association always exist. So that when the hiberante actually initializes the proxy it won't get "object not found" kind of excpetion. In hibernate mapping you do this by specifying contrained="true".