Sorry if this has been asked before, I certainly have tried to find
the answer myself, but have failed.
My question is.
Does anyone know how I can get nhibernate to insert without following
with a select to get the version value?
My reasoning for trying to change this behaviour is that it's somewhat
pointless and is adding overhead. My versioning strategy is an int, so
the default when inserting should be 1. Therefore, there's no need to
get that from the database as it's know before inserting.
Here's my version convention, I'm using Automap.
public class Version : IVersionConvention
{
public void Apply(IVersionInstance instance)
{
instance.Not.Nullable();
//instance.Generated.Never();
instance.Default("1");
instance.UnsavedValue("0");
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---