nvarchar(max) -> haslength(0)

2 posts, 0 answers
  1. rd
    rd avatar
    20 posts
    Member since:
    Jun 2007

    Posted 23 May 2012 Link to this post

    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?
  2. Zoran
    Zoran avatar
    534 posts

    Posted 25 May 2012 Link to this post

    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,
    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!
Back to Top