Using the automapping to expose a Sql Server 2008 configuration when you have UInt32 properties

Dommer's Avatar

Dommer

13 May, 2010 03:04 PM via web

I have objects with UInt32 properties and I'm trying to use automapping to create a configuration. It's failing due to the "dialect" not supporting UInt32. How would I go about autogenerating a configuration. I'm happy for NHibernate to map it to anything it see fit (e.g. bigint).

I've been trying to write an IUserType to do it, based on some posts I found, but changes to Fluent NHibernate means that much of the post code doesn't compile.

  1. Support Staff 2 Posted by James Gregory on 16 May, 2010 04:46 PM

    James Gregory's Avatar

    If you're using an IUserType you should just be able to call CustomType after your Map call.

    Map(x => x.UIntProperty)
      .CustomType<MyUserType>();
    

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

    You can attach files up to 10MB

    What is the opposite of bad?