I have a class with a type property byte[]that I would like to map to a field varbinary(max)in SQL Server using the new NHibernate ByCode mapping.
So far, using SchemaAction = SchemaAutoAction.RecreateNH to create the schema, I got the following (the name of the class property is "Data"):
- When the match is not qualified in any way, I finish the field
varbinary(8000) - When matching,
map.Property(x => x.Data, m => m.Length(int.MaxValue))I get an “image” field (which, according to SQL Server docs, will not be supported in the next version of SQL Server) - When displaying
map.Property(x => x.Data, m => m.Type(TypeFactory.GetBinaryType(int.MaxValue)), I get a field varbinary(8000)that just seems wrong
What am I missing?
source
share