how to use nvarchar(max) in hibernate xml

204 views
Skip to first unread message

chaitanya krishna

unread,
Dec 5, 2017, 7:12:21 AM12/5/17
to nhusers
HI i am new to nhibernate i am facing one problem using nhibernate

i read some where article and added to my xml file like this way

 <property name="templateBody" column="TemplateBody" type="StringClob" sql-type="NVARCHAR(max)" />

but at the time of run time it showing error like "The 'sql-type' attribute is not declared."

will u please some one help me on this

Oskar Berggren

unread,
Dec 5, 2017, 4:30:49 PM12/5/17
to nhusers
type is not necessary. Set length="" to anything between 4000 and 1073741822 (i.e. 1GB-2bytes) and you will get nvarchar(max).

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+unsubscribe@googlegroups.com.
To post to this group, send email to nhu...@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Oskar Berggren

unread,
Dec 5, 2017, 4:32:04 PM12/5/17
to nhusers
To be clear, length must be at least 4001 and at most 1073741822.
Reply all
Reply to author
Forward
0 new messages