New Posts New Posts RSS Feed: EntityServerException with Complex Types
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EntityServerException with Complex Types

 Post Reply Post Reply
Author
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Topic: EntityServerException with Complex Types
    Posted: 25-Mar-2008 at 9:11pm
I am trying to use a complex type in my data model but when I try to query one of the tables with the complex type, I get the following exception:

IdeaBlade.EntityModel.v4.EntityServerException: {"Argument types do not match"}
   at IdeaBlade.EntityModel.v4.EntityManager.HandleEntityServerException(Exception pException, Boolean pTryToHandle, PersistenceOperation pOperation)
   at IdeaBlade.EntityModel.v4.EntityManager.ExecuteServerQuery(IEntityQuery pEntityQuery)
   at IdeaBlade.EntityModel.v4.EntityManager.ExecuteFetch(IEntityFinder finder)
   at IdeaBlade.EntityModel.v4.EntityQueryFinder.Execute()
   at IdeaBlade.EntityModel.v4.EntityManager.ExecuteQueryCore(IEntityQuery query, QueryStrategy strategy)
   at IdeaBlade.EntityModel.v4.EntityManager.ExecuteQuery[T](IEntityQuery query, QueryStrategy strategy, Boolean checkT)
   at IdeaBlade.EntityModel.v4.EntityManager.ExecuteQuery[T](IEntityQuery`1 query)
   at IdeaBlade.EntityModel.v4.EntityQuery`1.GetEnumerator()
   at TestIdeaBlade.IdeaBladeTest.MembersInUtahQuery()

The inner exception is:

System.ArgumentException: {"Argument types do not match"}
   at IdeaBlade.EntityModel.v4.EntityServerProxy.CheckConnection(Exception pException)
   at IdeaBlade.EntityModel.v4.EntityServerProxy.Fetch(SessionBundle pBundle, IEntityQuery pQuery)
   at IdeaBlade.EntityModel.v4.EntityManager.ExecuteServerQuery(IEntityQuery pEntityQuery)

Is this a known limitation of beta1 or is there something that I might be doing wrong?

Thanks,

Dan
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: 26-Mar-2008 at 9:22am
The only problem we're aware of is the code generation problem you reported with using the wrong data types.  Btw, this was just fixed in current bits, and will be included in Beta2.
 
For the complex type in question, can you provide the CSDL, the code generated for it in the Domain Model, AND the code generated for the type in the EF model?  Also, include a snippet of the query you're trying to run.   Thanks!
 
 
 
Back to Top
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Posted: 27-Mar-2008 at 10:16pm
uploads/temp/20080328_011605_IdeaBladeTestEF.zip
 
Attached are the example files that you requested to take a look at.
 
Thanks,
 
Dan
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: 28-Mar-2008 at 10:35am
Thanks, Dan.
 
It looks like we have another code generation problem with complex types which is causing this error.  We don't generate nullable property types correctly - in this case the DateTime properties within the complex types - and you're seeing an error because these properties are correctly defined in the EF generated code. 
 
I've opened a new bug report for this.
Back to Top
danielp37 View Drop Down
Newbie
Newbie


Joined: 18-Mar-2008
Location: United States
Posts: 29
Post Options Post Options   Quote danielp37 Quote  Post ReplyReply Direct Link To This Post Posted: 02-Apr-2008 at 8:19pm
I have confirmed this.  If I remove the Dates from the complex types and make sure all of the other fields in the types are not nullable, then my complex types work correctly.

Thanks,

Dan
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: 03-Apr-2008 at 10:15am
Btw, we've already fixed this, and it will be included in Beta2.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down