New Posts New Posts RSS Feed: Generated properties with StringLengthVerifier are NOT updated when DB changes
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Generated properties with StringLengthVerifier are NOT updated when DB changes

 Post Reply Post Reply
Author
viola View Drop Down
Newbie
Newbie


Joined: 06-Jan-2009
Location: Singapore
Posts: 7
Post Options Post Options   Quote viola Quote  Post ReplyReply Direct Link To This Post Topic: Generated properties with StringLengthVerifier are NOT updated when DB changes
    Posted: 31-Aug-2009 at 10:01pm
Hello DevForce Support,
 
Would you please explain how to trigger the auto-generation of verifiers? Particularly StringLengthVerifier. Because I didn't find relevant settings in object mapper. And my problem is that, for instance not all tables with similar columns(string) will have verifiers generated for the properties in their Entity counterparts. Additionally for those generated, say if the maxlength is set to 250, when table updated and change max length to 150, this change won't be reflected into the latest design.cs, so verifier is still checking against length 250.
 
Thanks.
Viola 
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 02-Sep-2009 at 8:45am
As for the second question: the Entity Framework is conservative in its changes to the Conceptual model, since it does not and cannot know what aspects of that model you want to parallel the Storage schema, and which you do not. You could have your own reasons for wanting the allowed string length in the application to be longer than the one persisted to the database. It would be an unusual case, but somewhere out there, there's somebody with a use case that needs it.

As for the first case, I'm unaware of circumstances where some string columns trigger the generation of string length verifiers and others do not.  I'll ask around.
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 02-Sep-2009 at 2:46pm
If the columns are defined with a MaxLength of Max then the string length attribute should not be generated. Otherwise, they should appear. Let us know if you're seeing something different.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down