Have you tried a version column with the default type, an integer? NHibernate needs to know the version value to update it's caches. On a DB controlled timestamp column the extra select is required. With an integer column, NH calculates the field before the update and no further select is required.
On Thursday, 19 April 2012 17:48:33 UTC+1, Greg wrote: > > I use Versioning with SQL Server with a rowversion(timestamp) column. > In Entity Framework one can disable the select after insert/update > with a simple flag. > But I couldn't figure out how to do it in NH. This fact disables > batching completely and slows down things considerably. > > I don't care what's the updated rowversion value after the insert/ > update. > Any idea how to disable the select after insert/update with a db > generated rowversion column? > > This is my current mapping: > <version name="RowStamp" type="Byte[]" insert="false" > generated="always" unsaved-value="undefined"> <column name="RowStamp" > not-null="true" sql-type="rowversion" length="8"/> </version> > > If I remove generated, I get some null pointer exception somewhere > deep inside NH. > > What kind of mapping could I use to disable the select after insert/ > update, or is there some other config option inside NH for that. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/mHy5pbXnEKAJ. 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.
