This is a migrated thread and some comments may be shown as answers.

keyword Inner not recognized with Join queries

1 Answer 38 Views
LINQ (LINQ specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Krasimir
Top achievements
Rank 1
Krasimir asked on 21 Apr 2011, 07:50 AM
[OpenAccessException: Field 'inner' not found on class 'Infonetica.TA.DAL.Fungalstudy'.] Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type type, Int32 elementAt, Object[] groupResolutionParamValues) +942 Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues) +80


 [InvalidOperationException: An exception occured during the execution of ' Extent<Infonetica.TA.DAL.Fungalstudy>.Join(Extent<Infonetica.TA.DAL.FungalstudyStateForm>, Param_0 => Param_0.inventoryID, Param_1 => Param_1.inventoryID, (outer, inner) => new DynamicClass1() {ItemID = outer.id, Data = outer, StateForm = inner, InventoryID = outer.inventoryID})'. See InnerException for more details. ]

What may be wrong with the above query ? What keyword I can use for selecting data from inner sequence?

Why parser tries to evaluate "inner: as property of the outer sequence ?. I\m using ORM Q2.2010.


Best regards
Krasimir Filipov
 

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 22 Apr 2011, 07:29 AM
Hi Krasimir,

 This query seems perfectly fine and I believe it is working with the latest version of OpenAccess ORM. 
Here is the query I used for testing:

EntitiesModel context = new EntitiesModel();
 
var result = context.Products.Join(context.Orders, outer => outer.CategoryID, inner => inner.EmployeeID, (outer, inner) => new
{
    ItemId = outer.CategoryID,
    Data = outer,
    StateForm = inner,
    InventoryId = inner.OrderID}).ToList();

Could you confirm that this query actually resembles the query you had written on your side. If that is so, it means that even if a problem was available in the version you are using, it has already been fixed. I suggest you to really use the latest version of Telerik OpenAccess ORM sa it contains lots of fixes and improvements in all areas and Linq is especially one of them.


Kind regards,
Zoran
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
LINQ (LINQ specific questions)
Asked by
Krasimir
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or