fluent nhibernate - FluentNHibernate: mapping a nullable int Version property -


How do I map a version property using conventions (such as ICLASAmpassment, Automaper Configuration)?

  Public intangible class unit {... public virtual int? Version {received; Protected Set; } ...} & lt; Class ... & gt; & Lt; Version name = "version" column = "version" generated = "never" type = "int 32" not saved-value = "0" /> & Lt; / Square & gt;  

Replace the version with an int?

FluentNHibernate automatically identifies a property named "version" or "timestamp" as a variant field. Although it should be one of the few types (int, tall, timespace, byte []) See the version steps in the FNH source.

You can customize this column with IVersionConvention (just choose which property is not your version). I saw that this facility may be already in the trunk.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -