Hibernate version:1.2.1 GA
I've got NHibernate generating a guid.comb for a primary key of one of my POCOs, however every so often I would prefer to provide the primary key. When I fill the property and save the new instance to the database, NHibernate generates a Guid.comb and overwrites the key I supplied.
I suppose I could save the new object, then edit it to modify it's primary key, but that's more DB use than I want in this system.
Am I missing something? Is there some way I can occasionally (1%-2% of the time) provide my own key while preserving the guid generation the rest of the time?
|