Howdy,
So I've got a simple table with an ID field that's incrementally generated on INSERT.
I've set the mapping up in NHibernate to reflect this:
<id name="ID">
<generator class="identity" />
</id>
And it all works fine.
Trouble is, I need to get the generated ID after I've saved a new model to use elsewhere:
var model = new MyModel();
session.SaveOrUpdate(model);
But at this stage model.ID == null, not the ID.
Any ideas?
Anthony