I'm retrieving an entity from my database by doing :

 tx = provider.Session.BeginTransaction();

c = provider.getCuttingById(177040);

tx.Commit();

In the sql generated by NHibernate, there's only a select statement
retrieving my entity (of type Cutting).

However if I do that :

Cutting cuttings = provider.Session.CreateCriteria(typeof
(Cutting)).SetFetchMode("thePublication", FetchMode.Eager).Add
(Expression.Like("Headline", "%today%")).List<Cutting>()[0];

That returns the same Cutting entity along with a many-to-one Entity
property of type Publication.

But this time when I execute tx.Commit(), NHibernate generates a
UPDATE statement ! That doesn't make sense because I'm not modifying
anything here ....

Hope this is clear enough... Could someone explain ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to