New Posts New Posts RSS Feed: Unable to evaluate XPath: '' or Attribute: 'MaxLength'
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Unable to evaluate XPath: '' or Attribute: 'MaxLength'

 Post Reply Post Reply
Author
smiller View Drop Down
Newbie
Newbie


Joined: 14-Apr-2008
Location: United States
Posts: 16
Post Options Post Options   Quote smiller Quote  Post ReplyReply Direct Link To This Post Topic: Unable to evaluate XPath: '' or Attribute: 'MaxLength'
    Posted: 19-Jun-2008 at 2:33pm

Getting an error with DEF RC1 when trying to Save the Domain Model from inside the DevForce EF Object Mapper that says:

Failed to save model file:
'C:\myfile.ibedmx'.

Eval error: Unable to evaluate either XPath: '' or Attribute: 'MaxLength'

Thinking maybe my ADO.NET Entity Data Model was corrupted I blew that project away completely and slowly started from scratch, this time adding only a single table to the model.  Saved my Model.edmx file, opened DevForce EF Object Mapper, clicked the Save button with success.

Went back to the Model.edmx file in the designer, added another table, saved the Model.edmx file, opened DevForce EF Object Mapper, clicked the Save button and saw the same error message outlined above.
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 20-Jun-2008 at 9:55am
Can you post your edmx file? -- or if too large, send it to support@ideablade.com.
 
Thanks.
Back to Top
smiller View Drop Down
Newbie
Newbie


Joined: 14-Apr-2008
Location: United States
Posts: 16
Post Options Post Options   Quote smiller Quote  Post ReplyReply Direct Link To This Post Posted: 22-Jun-2008 at 8:14pm
Sent in email on Friday.
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 27-Jun-2008 at 11:47am

The root cause of the problem is that the Object Mapper expects a “MaxLength” attribute on each property of Type=”String” in the CSDL section of the edmx file.  We have worked around the problem by adding “MaxLength=”Max” to all “String” properties in the CSDL section of the file that did not adhere to this rule.  This workaroround will be replaced by a real fix in the next maintenance release of the product. If the  “MaxLength” attribute does not exist. We will create an attribute for it.

 

Back to Top
sebma View Drop Down
Groupie
Groupie
Avatar

Joined: 19-Aug-2008
Location: Singapore
Posts: 66
Post Options Post Options   Quote sebma Quote  Post ReplyReply Direct Link To This Post Posted: 19-Aug-2008 at 10:08pm
Either you use the workaround from davidkitzke above, or you have to specify the max length for string columns in database then re-generate your edmx. Either way, it is now a hassle if you are updating data definition.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down