OK, working fine :)
I should use left join fetch cause of empty sets of dependent objects.
Thanks for your help

Beniamin


Tomasz Mazan wrote:
> 
> Jacek
> Thanks for your advice. I use named queries and...
> 
> 1) if I use query like
> 
> @NamedQueries({
>       @NamedQuery(name = "ProductWithDeps", 
>                   query = "SELECT p FROM Product p" 
>                               + " WHERE p.number = :number")                  
>         
> })
> product is found and returned, but if I use query like:
> 
> 2)
> @NamedQueries({
>       @NamedQuery(name = "ProductWithDeps",
>                   query = "SELECT p FROM Product p" 
>                           + " join fetch p.blocks"
>                               + " WHERE p.number= :number")                   
>         
> })
> I get null as a finder result. What's wrong ?
> 
> Beniamin
> 
> 
> Jacek Laskowski wrote:
>> 
>> On Nov 26, 2007 5:04 PM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:
>> 
>>> How can I force DAO layer (that uses EntityManager) to initialize found
>>> object with all its subobjects ?
>> 
>> Use named queries with FETCH JOINs?
>> 
>> Jacek
>> 
>> -- 
>> Jacek Laskowski
>> http://www.JacekLaskowski.pl
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Force-to-load-subobjects-in-OpenJPA-tf4876000s134.html#a13972650
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to