This article is a mirror article of machine translation, please click here to jump to the original article.

View: 36495|Reply: 1

[Frame] How to store strings longer than 4000 characters in NHibernate 3.3

[Copy link]
Posted on 11/23/2017 2:48:16 PM | | |

The length of the string value exceeds the length configured in the mapping/parameter.

Some people will say that this is a bug in the new version of NHibernate, and this will not happen in 3.2. In fact, for the attribute value of the string type, the NHibernate default value maximum is 4000 characters, in 3.2 it will be automatically truncated, in 3.3 it will throw you an exception, so this is not a bug, if you want to store strings of more than 4000 characters, please modify the type of the property in the mapping file, use type="StringClob"


  

Reference: The first one is a bug report on NHibernate's JIRA task management system, if you find any NHibernate bug, you can log in to the system to create a bug task, and there will be professionals to verify the fix.

https://nhibernate.jira.com/browse/NH-3130

http://stackoverflow.com/questions/12708171/the-length-of-the-string-value-exceeds-the-length-configured-in-the-mapping-para




Previous:mvc webapi filters to get the request parameters and response content
Next:EF code first attribute string type adds index properties
Posted on 10/24/2021 6:02:42 PM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com