So I did, it's still reproducible when I have 1 entity with just one
property. I managed to find out that it follows this pattern:
int stringLength = int.MaxValue;
mapper.Class<Student>(map => map.Property(c => c.Notes, pm =>
{ pm.Type(NHibernateUtil.StringClob); pm.Length(stringLength); }));
when stringLength is up to and including 4000, it will create a column
in the database with an equal length (i.e nvarchar(0-4000))
when stringLength is from 4001 up to and including int.MaxValue / 2,
it will become nvarchar(max).
BUT when stringLength is from (int.MaxValue/2)+1 up to and including
int.MaxValue, it will become nvarchar(256).
A bug report has been filed at:
https://nhibernate.jira.com/browse/NH-2818
If this is the intended behavior for some reason, then please
disregard this.
Cheers!