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.
|