Subsonic BatchQuery.Queue causing 'Can't decide which property to consider the key...' exception -


I'm just starting with the subscore 3.0 activation and trying to implement the batch query in one I am I am using a batch so that I will ask a user and a list of user orders in one shot.

System.InvalidOperationException: This is fixed when I call the batchability .ui () method, by adding my "selection user" query, the subsonic throws the following exception:

Can not say which property to consider the key - you can create an ID called 'id' or mark a mark with the subsonic mirror

The code is as follows: < / P>

  var db = new MyDB (); Var user goes in User = db.Users // UID by UID, where u.uid == 1 select U; Var Provider = Provider Factory.GetProvider (); Var batch = new batch suit (provider); Batch.Queue (userQuery); // Exception here // and add the "Select user order" query here ...  

First things first - why this error? My subsonic user object knows about PK. The "UID" database has PK and the generated code shows this. And I thought the SubSonicPrimaryKey feature was for SimpleRepository? Is not this the method of batching for the active record?

I can ask many other questions, but I will leave it on it.

Edit - After further investigation

If someone can help me understand what's going on and how to do 2-bit questions Be thankful! Adam ran right through the source code with the debugger - ToSchemaTable () method in Objects.cs is apparently making my schema and failed to find PK. At the very end, it tries to find a column named "ID" and flags it as PK, else it throws an exception I added a check for "UID" and this work!

Still ... I'm confused after peeling the layer after the source layer, I think that's a bit lost, but it seems that this part of the code is a schema for my table Trying to create and completely ignore my generated user class - which quite well reveals which column / property is PK! It does not seem right that I will need the name of all the key "id" w / ActiveRecord.

I think the answer you are looking for is that it is in my part Is really stupid I am hoping to take another build further next week and if you can put it in the list of this issue, then I appreciate it. My apologies ...


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -