fetch « Load « JPA Q&A

1. Clarifying terminology : "Hydrating" an entity : Fetching properties from the DB    stackoverflow.com

In the context of ORM / Lazy loading of entities, my understanding of the term "Hydration" is as follows: "Hydrating" describes the process of populating some or all of the previously unpopulated ...

2. Hibernate eager loading (fetch all properties does not work)    stackoverflow.com

Basically I want to eager-load properties. I have the following HQL query:

SELECT u.id AS id, u.name AS text, u AS obj FROM User AS u fetch all properties
I would expect this ...

3. Understanding the Lazy fetch    stackoverflow.com

public class Bid {

    @Column(name = "bid_id")
    private Long bidId;

    @Column(name = "bid_amt")

4. HQL query lazy fetching    stackoverflow.com

Having this HQL query,

<query name="com.viagents.dao.rule.ConditionalRule.query.by.name">
        FROM com.viagents.dao.rule.ConditionalRule as cr
        WHERE cr.name LIKE ...

5. No eager loading of collection with fetch="join"    forum.hibernate.org

Newbie Joined: Fri Jun 22, 2007 2:03 pm Posts: 4 I am using 3.3.1.GA, complete code is attached below. i have a forum with members which have articles. i want the articles always loaded eagerly when a member is loaded. i defined fetch="join" on the collection mapping. Code: [..] ...

6. lazy loading by setting fetch="join" in many-to-one problem!    forum.hibernate.org

I am using Hibernate 3.x. I have a Staff object which has one-to-one association (many-to-one with unique constraint) with few objects. Since I have to send the Staff object back to the web-tier I create a DAO and therefore want to avoid lazy loading (reducing unnecessary trips to the DB). I thought that this could be done by setting fetch="join" in ...

7. Hibernate eagerly fetching data that should be lazily loaded    forum.hibernate.org

Newbie Joined: Fri Jul 30, 2004 11:04 am Posts: 1 Hi All, Hibernate looks like it is generating unnecessary queries that are significantly lowering our application's performance and seem to be causing deadlocks. Of course, since we are Hibernate beginners it is probably our fault. At any rate, we are using Hibernate 2.0.3 against MS SQL Server 2000. The problem is: ...

8. lazy loading not working, defaulting to immediate fetching    forum.hibernate.org

I know for a fact that i am not accessing any fields from any of the many-to-one objects. i turned on the debug and looked at the output and i am still not sure why it is forcing the associations to be lookedup. here is a little of the debgu output: first the sql for the main object is run then.... ...

9. unable to use HQL "join fetch" with load-collectio    forum.hibernate.org

Hi, I have a collection that is loaded with load-collection. The resultset contains the primary key of the "FROM" entity aliased as ID. The element of the mapping is blank, which defaults to ID. The problem is that I cannot use this association in an HQL "join fetch". Hibernate is 3.1 Here are the relevant parts of the mapping: ...

10. Some Object are not loaded in eager fetch join?    forum.hibernate.org

11. Unable to load a collection using an eager fetch    forum.hibernate.org

I have a one to many mapping between the CelIdentity (parent) and CatsChannelValues (child). The CatsChannelValues collection is lazily loaded. In the scenario (code snippet given below) I want to load the parent and collection in select. When I do this using this code Code: Session session = HibernateUtil.getSession(); ...

12. lazy loading and lazy fetching    forum.hibernate.org

13. fetching 'lazy loaded' collections    forum.hibernate.org

14. Newbie confusion with lazy fetching/load problem    forum.hibernate.org

Author Message MikePhoenix Post subject: Newbie confusion with lazy fetching/load problem Posted: Thu Sep 17, 2009 11:24 pm Newbie Joined: Thu Sep 17, 2009 10:02 pm Posts: 4 I'm having a problem with lazy fetching and accessing data through hibernate from my JSF Web app. I am using a DAO pattern to access my data through Hibernate. At first, ...