New Posts New Posts RSS Feed: Unable to get metadata error
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Unable to get metadata error

 Post Reply Post Reply
Author
scapstick View Drop Down
Newbie
Newbie


Joined: 18-May-2012
Posts: 5
Post Options Post Options   Quote scapstick Quote  Post ReplyReply Direct Link To This Post Topic: Unable to get metadata error
    Posted: 24-May-2012 at 2:03pm
I found the problem, the AuthenticationContext wasn't set on that EntityManager.
 
I have a new error I can't find though.  When executing this statement

            var query = emInboxPromoCatalog.Member_PromoCatalog
                        .With(QueryStrategy.CacheOnly)
                        .Where(memberIDPredicate)
                        .Execute();
 
I get this error:
Unable to get metadata for LEAF.BusinessObjects.Promotions.Member_PromoCatalog. Make sure it is a valid entity type or POCO type with a KeyAttribute
   at IdeaBlade.EntityModel.EntityMetadataStore.GetEntityMetadata(Type entityType, Boolean canThrowException)
   at IdeaBlade.EntityModel.EntityManager.CreateEntityGroupAndInitialize(Type entityType)
   at IdeaBlade.EntityModel.EntityManager.GetEntityGroup(Type entityType)
   at lambda_method(Closure , EntityManager )
   at IdeaBlade.EntityModel.EntityQuery`1.ExecuteExpression()
   at IdeaBlade.EntityModel.EntityQuery`1.ExecuteCacheQuery()
   at IdeaBlade.EntityModel.EntityQueryFinder.ExecuteFind(Guid queryGuid)
   at IdeaBlade.EntityModel.EntityQueryFinder.Execute()
   at IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync)
   at IdeaBlade.EntityModel.EntityManager.ExecuteQuery[T](IEntityQuery`1 query)
   at IdeaBlade.EntityModel.EntityQueryExtensions.Execute[T](IEntityQuery`1 query)
   at LEAF.DataModels.PromoCatalog.PromoCatalog_DataModel.load_InboxMemberPromoCatalogsForMemberIDAsync(Decimal memberID)
   at LEAF.DataModels.PromoCatalog.PromoCatalog_DataModel.<load_InboxMemberPromoCatalogsForMemberIDCoroutine>d__19.MoveNext()
   at IdeaBlade.EntityModel.CoroutineSerialProcessor.Process()
I don't see a request to the server yet so it looks like it's a client side isse (Silverlight).  Where should I look to try and find what is missing? 
 
Thanks,
Sean
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 24-May-2012 at 2:46pm
Sean,
 
Is all Member_PromoCatalog's partial classes shared/referenced/present in the client?
 
On a separate note, if you expect a request to the server, you should be running this query async. (This is a Silverlight app, correct?)
 
Silvio.
Back to Top
scapstick View Drop Down
Newbie
Newbie


Joined: 18-May-2012
Posts: 5
Post Options Post Options   Quote scapstick Quote  Post ReplyReply Direct Link To This Post Posted: 25-May-2012 at 8:24am
PromoCatalog.edmx is in it's own project.  It of course has PromoCatalog.edmx.tt and the generated PromoCatalog.IB.Designer.cs in it.  No other classes.
The silverlight app has a file link to PromoCatalog.IB.Designer.cs so it gets included in the compile.
 
And I didn't know what to expect from the call but you're right, it's not a server call.
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 29-May-2012 at 12:32pm
Hi Sean,
 
Does the issue only occurs with the Member_PromoCatalog entity? Also, does it only occur when querying CacheOnly? Is this a multi-model solution?
 
Can you provide a small solution reproducing the issue?
 
Regards,
   Silvio.
Back to Top
scapstick View Drop Down
Newbie
Newbie


Joined: 18-May-2012
Posts: 5
Post Options Post Options   Quote scapstick Quote  Post ReplyReply Direct Link To This Post Posted: 30-May-2012 at 11:17am
Yes, only that entity and only CacheOnly.  If I skip the CacheOnly, execute the async server request, it runs and returns 2 rows, and if I execute the CacheOnly after that, it runs, returning the 2 rows cached by the async call.
I'll see if I can make a small solution of it. 
By multi-model do you mean multiple edmx's?  If so then yes, there's 7 edmx models and most have been called before this point.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down