Hi,
Call Session.Delete(object) never executes the DELETE SQL.
If I wrap it in a transaction - it does.
Additionally when I use Session.SaveOrUpdate(object) I don't need to wrap it
in transaction or Flush. It does execute the SQL.
Feels very inconsistent. Do I miss something?
I do not provide any additional settings in config (FNH), so just all the
defualts are used.
Code 1:
var p = WorkSpace.Get<Product>(id);
WorkSpace.Delete(p);
Code 2:
var p = new Product { Name = "asd" };
WorkSpace.SaveOrUpdate(p);
As far as I know NH now uses implicit transaction, so it's not mandatory to
wrap code in transactions.
My main question is WHY Delete does NOT execute SQL DELETE and SaveOrUpdate
DOES?
Should I Flush session after every operation?
Thanks,
Dmitriy.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---