Hi, I am having this problem..
using (var transaction = Session.BeginTransaction())
{
var t = new Ticket();
t.Title = "TestTicket";
var ticketId = (Guid)Session.Save(t);
var pe = new ProcessExec();
pe.Ticket = t;
Session.Save(pe);
var ticket = Session.Get<Ticket>(ticketId);
transaction.Commit();
Assert.NotNull(ticket);
Assert.True(ticket.ProcessExecCollection.Count > 0);
}
Now the problem is this that the assert fails on
Assert.True(ticket.ProcessExec.Count>0).
But If I do Session.Refresh(ticket); just after the
transaction.Commit(), everithing works fine.
How to tell NHibernate that when I create new ProcessExec and set its
ticket, to automatically update the ticket?
I need this because I do lots of stuff creating and selecting in a
transaction.
Please help.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.