I'm pretty sure you are talking about an aggregation class where we are avoiding some roundtrip.... we like avoid roundtrips but if you are using identity we must do, at least, a roundtrip at session.Save and... you are breaking the UnitOfWork pattern, nullifying the batcher and so on...
2009/10/29 Kent Boogaart <[email protected]> > > Hi, > > I feel like I must be missing something obvious. I'm using 2.1.0.GA. I > have code that saves an entity with ID mapped as: > > <id name="Id" type="int" unsaved-value="0"> > <generator class="native"/> > </id> > > The entity is successfully saved, but its Id property remains as zero > afterwards. > > How can I have NHibernate automatically update the Id property to the > value of "SELECT SCOPE_IDENTITY"? > > I read somewhere about applying an IdAttribute to my entity's Id > property, but that attribute no longer appears to exist. > > Thanks, > Kent > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
