Why are assigned id’s frowned upon in the Nhibernate world? Is there a particular disadvantage to using it?
+2
A:
NHiberante uses ID for caching entities in first level cache and Id is used to check if an entity is trancident or persisted. When you call SaveOrUpdate method NHibernate won't be able do determine if this entity new or it must be updated.
Also if you suddelny change ID of the entity, and save it - you can update wrong row in the data base.
Sly
2010-01-22 08:11:17