Linq to SQL many to many error

Linq to SQL many to many error

Postby keeper » Mon 27 Dec 2010 10:33

Hi, I'm trying to create a DataContext for some tables in my Oracle DB.
In particular I have two tables with a many to many relation using these tables:

ACTION_LIST <-(A)-> USER_GROUP_ACTION_ASS <-(B)-> USER_GROUP_LIST

the (A) relation uses two columns (APPLICATION_NAME, ACTION_NAME) while the (B) relation uses only one (USER_GROUP)

I created succesfully the Linq objects from database but when I try to execute a Linq query I get this error:

The number of ThisKey columns is different from the number of LinkThisKey columns for the association property 'UserGroupLists' in the type 'ActionList'.


What can I do to solve it?

Thanks in advance.
keeper
 
Posts: 17
Joined: Mon 27 Dec 2010 09:20

Postby StanislavK » Mon 27 Dec 2010 13:57

Thank you for your report. We will investigate this problem and inform you about the results as soon as possible.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Fri 21 Jan 2011 16:47

We have fixed the issue. The fix will be available in the nearest build which we plan to release in about a week.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby keeper » Thu 27 Jan 2011 16:13

I just tried the latest build (6.10.96) and now there's another problem:
Trying to Load() the relative EntitySet throws a exception:
Code: Select all
System.ArgumentOutOfRangeException
  Source="mscorlib"
  ParamName="index"
  StackTrace:
       in System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       in System.ThrowHelper.ThrowArgumentOutOfRangeException()
       in System.Collections.Generic.List`1.get_Item(Int32 index)
       in Devart.Data.Linq.u.a(av A_0, List`1 A_1)
       in Devart.Data.Linq.u.a(MetaDataMember A_0, av A_1, List`1 A_2)
       in Devart.Data.Linq.Provider.g.a(bg A_0)
       in Devart.Data.Linq.Provider.g.a(SqlExpression A_0)
       in Devart.Data.Linq.Provider.g.b(bg A_0)
       in Devart.Data.Linq.Provider.h.a(bg A_0)
       in Devart.Data.Linq.Provider.g.a(SqlExpression A_0)
       in Devart.Data.Linq.Provider.g.a(SqlExpression A_0, Boolean A_1)
       in Devart.Data.Linq.Provider.n.a(IDataServices A_0, SqlExpression A_1, Boolean A_2)
       in Devart.Data.Linq.Provider.n.a(Type A_0, SqlExpression A_1, IDataServices A_2, Type A_3, Type A_4)
       in Devart.Data.Linq.Provider.DataProvider.CompiledQuery.GetReaderFactory(List`1 elementInstanceTypes, IDataServices services, SqlNode query)
       in Devart.Data.Linq.Provider.DataProvider.CompiledQuery..ctor(QueryInfo queryInfo, IDataServices services, Boolean isQueryObjectByKey, Object queryObjectKey)
       in Devart.Data.Linq.Provider.DataProvider.CompiledQuery..ctor(QueryInfo queryInfo, IDataServices services)
       in Devart.Data.Linq.Provider.DataProvider.BuildQuery(SqlNode nestedNode, IList`1 parameterAccessors)
       in Devart.Data.Linq.Provider.DataProvider.Compile(SqlNode nestedNode, IList`1 parameterAccessors)
       in Devart.Data.Linq.Provider.DeferredQuery`3.a()
       in Devart.Data.Linq.Provider.DeferredQuery`3.a(TKeyQuery A_0)
       in Devart.Data.Linq.Provider.DeferredSource`2.b()
       in System.Data.Linq.EntitySet`1.Load()
       in Test.Program.Main() in D:\Projects\Test\Program.cs:row 26
       in System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       in System.Threading.ThreadHelper.ThreadStart()
  InnerException:
keeper
 
Posts: 17
Joined: Mon 27 Dec 2010 09:20

Postby StanislavK » Fri 28 Jan 2011 18:13

Thank you for your report, we've reproduced the problem. We will inform you as soon as it is fixed.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Thu 10 Feb 2011 17:43

We have fixed the issue, the fix is available in the new 6.10.103 build of dotConnect for Oracle. This build can be downloaded from
http://www.devart.com/dotconnect/oracle/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/

For the detailed information about the fixes and improvements available in dotConnect for Oracle 6.10.103, please refer to
http://www.devart.com/forums/viewtopic.php?t=20224
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle