Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.43 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Fluent Nhibernate: How to change field mapping depending on the underlying database?
  2. public class CommonClassMap<T> : ClassMap<T> where T:Entity
  3. {
  4.     public CommonClassMap()
  5.     {
  6.         if (SQLITE)
  7.         {
  8.             Version(n => n.Version);
  9.         }
  10.         else
  11.         {
  12.             Version(n => n.Version).CustomSqlType("timestamp").UnsavedValue("null").CustomType("BinaryBlob").
  13.                 Generated.Always();
  14.         }