I have a database (mysql) for an account management system that contains a user table
the user table references two other important tables:
site
user_group
user_group references two tables:
user_group_user_activity
user_group_trans_type
user_group_user_activity references user_activity
user_group_trans_type references trans_type
I have an entity data model created for this database using the data connector from mysql (version 6.2.2).
what I'm trying to do is this:
I am getting the following exception at runtime:Code:user u = dbObject.users.Include("sites") .Include("user_groups") .Include("user_groups.user_group_user_activities") .Include("user_groups.user_group_trans_types") .Include("user_groups.user_group_user_activities.user_activity") .Include("user_groups.user_group_trans_types.trans_type") .FirstOrDefault();
and the inner exception:Code:[System.Data.EntityCommandCompilationException] = {"An error occurred while preparing the command definition. See the inner exception for details."}
so it seems like it's having trouble constructing a query for this request.Code:InnerException = {"Specified method is not supported."}
am I requesting objects too deep in the tree for the connector to handle, or is there something else I'm doing wrong?
if I only request user_group_user_activities or user_group_trans_types it works fine, but when I add the other, it fails.
if I omit the includes and explicitly call user_group_trans_types.Load() and user_group_user_activities.Load() on each of the user_groups, it loads them, but omits the user_activity and trans_type members. is there a way to make it load them explicitly?



LinkBack URL
About LinkBacks



