views:

480

answers:

2

I have question about fluent nhibernate and mysql. I'm doing this:

Fluently.Configure()    
.Database(MySQLConfiguration.Standard.ShowSql())    
.Mappings(m =>        
m.FluentMappings        
.AddFromAssemblyOf<ShopperMapping>())    
.BuildConfiguration();SchemaExport 
exp = new SchemaExport(cfg);
exp.Execute(true, false, false, true);

But when doing this I get failures like "Dialect does not support DbType.Uint32" and the likes. I get the same for mapped properties that are of type Uint64 (ulong). Why does this happen? Does anyone know? Do I need to map in some other way? Like explicitly saying which access strategy to use or something like that?

Regards, Jörgen

A: 

I think this is useful hxxp://stackoverflow.com/questions/639428/how-to-map-uint-in-nhibernate-with-sql-server-2005 Is exactly your problem but on MSSql Server

Regards

Sacx
Ok, I read that subject and it seems a lot like the problems I am having. I am a bit surprised though if this means that NHibernate does not support mapping of unsigned integer values? Why waste a signed integer on a value that will never be below zero?Could this really be the case or am I just not doing it right?Regards, Jörgen
+1  A: 

NHibernate does not support unsigned integer types. The full list of basic types implemented by NHibernate can be found in the documentation.

I don't know of any "official word" as to why they are not, but if I had to guess it's that some* major database engines for whatever reason do not support unsigned integers.

*for appropriately small values of "some"

Stuart Childs