I have a root-childs list of objects that is (lazy) loaded with session
as show under:
            var session = GetSession();
            using (var t = session.BeginTransaction()) {
                var roots = session.QueryOver<RootObject>()
                    .OrderBy(x => x.Id).Asc
                    .List<AbstractObject>();

                //t.Commit();

                return roots;


Both roots and childs object inherits from an AbstractObject.

I need to set to null an object inherited from both root and child if
one of is property is null from db. For this goal I have implemented
IPostLoadEventListener.
I have a strange scenario: if I uncomment t.Commit() before the return
keyword (see above) I have runtime error (could not execute batch
command.[SQL: SQL not available]). Otherwise all is fine. Why this
happens? It's a desired behavior?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to