Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# shanyou 2/14/2005 9:25 PM
I add an artice that it's content Length 8000. After I saved it has only 2000 character. I double whether it is a nhibernate bug.
# martijnb 2/15/2005 9:21 AM
Hmmm, that shouldn't happen. Which database are you using? The article contents are mapped with datatype String and no length specified (so I assumed it would be unlimited but perhaps I was wrong with this).
# shanyou 2/16/2005 7:00 AM
I use database of MS SQL Server 2000
# martijnb 2/16/2005 10:14 AM
OK, I'll give it a look.
# martijnb 2/16/2005 12:27 PM
Yep, when you leave out the size of the String in the mapping, the SQL Server provider truncates the text to a fixed size because the parameter needs to have a length.

I changed the type from String to StringClob of the Content properties (StaticHtmlContent.hbm.xml and Article.hbm.xml). It now defaults to a much bigger size.

You can change the mappings yourself. It will likely solve your problem.