This is a migrated thread and some comments may be shown as answers.

nvarchar(max) -> haslength(0)

1 Answer 101 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
rd
Top achievements
Rank 1
rd asked on 23 May 2012, 02:42 PM
configuration.HasProperty(x => x.ExtendedProperties).HasFieldName("_extendedProperties").WithDataAccessKind(DataAccessKind.ReadWrite).ToColumn("ExtendedProperties").IsNullable().HasColumnType("nvarchar(max)").HasLength(0);

the designer is generating this. HasLength(0), is this ok?

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 25 May 2012, 10:47 AM
Hi AmbiSIG,

 Yes, this is not a problem since the lenght metadata variable is not managed nor taken into account during runtime in the case where your SQL type is nvarchar(max). The  max parameter, which is dependent of the database server type and version, will always be applied for the length if a user tries to create a database script out of the generated metadata.

Kind regards,
Zoran
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Tags
Design Time (Visual Designer & Tools)
Asked by
rd
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or