sql « Fetch « JPA Q&A

1. HQL: Fetch Join Collections from Eager Table    stackoverflow.com

I have four tables:

RootNode // Will return multiple root nodes 
SubNode // Will return one sub node per root node
SubNodeChildren1 // Will return multiple for each sub node
SubNodeChildren2 // Will return ...

2. How to retrieve SQL from HQL    forum.hibernate.org

3. Specifying joined fetch in native sql?    forum.hibernate.org

Newbie Joined: Fri Mar 26, 2004 1:01 pm Posts: 11 Hibernate version: 3.0 I'm using Hibernate3 to fetch some data from a legacy database using a native sql query. The class I'm fetching has the usual pile of properties, and a collection of integers that I'd like to store in an int[] in my Java code. The data from this database ...

4. Custom SQL for Lazy association fetch?    forum.hibernate.org

Hi There, I'm dealing with a very poorly architected database that has been around since the dawn of time so I can't change it. Without boring you on the details this is what I need to do: 1. I get a list of rows from a table (FOO) 2. For each FOO I need to get FOO.getBar() but it can't be ...

5. Eagerly fetching many-to-many associations with Native SQL    forum.hibernate.org

Newbie Joined: Sat Mar 07, 2009 4:24 am Posts: 10 Greetings! I had to move to native SQL to utilize some stored functions written on PL/pgSQL that return row data exactly the same way as tables do. I ran into the issues with associations. Since I am using custom SQL for loading it is desirable in my case to eagerly fetch ...