-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: HQL question!
PostPosted: Fri Nov 10, 2006 11:32 am 
Newbie

Joined: Sun May 28, 2006 7:42 pm
Posts: 19
Location: Italy
Hi.
Nhibernate docs says that with hql you can overrides mapping files lazy and outer-join directive.

Now i have some class and their mapping files
eg. Account -- Account Setting

Account has a AccountSetting bag with outer-join set to true so i can obtain in a single select comand all AccountsSetting for each account. Ok
Using hql i guess that calling "from account a" will not return AccountSettings also, but this isn't true. Than, how i can overrids this mapping file?
And also: using this hql directive "from Account a left join fecth a.AccountSettings" will override a mapping file in which AccountSettings bag outer-join is setted to false?


Other question : Since i'm using a DataRepository, when i call a function, eg. Account.Find(string hqlcommand), at the end of this function the session is closed.
After that i'ts impossible to get associated class property setted to lazy=false but it should contains initialized class if mapping files has outer-join=true?
Is it right?

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.