Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types:
SCG.TAG.GES.RiskLimit.CalcEngine.CcObligorEngine+ObligorSpreadData
vs
SCG.TAG.GES.RiskLimit.CalcEngine.EmCcObligorEngine+ObligorSpreadData
The last working version was dcoracle84pro = Version 8.4.254 (25-Sep-2014)
Stack trace:
Object of type 'Devart.Data.Linq.Engine.ObjectReader`1[SCG.TAG.GES.RiskLimit.CalcEngine.CcObligorEngine+ObligorSpreadData]' cannot be converted to type 'System.Collections.Generic.IEnumerator`1[SCG.TAG.GES.RiskLimit.CalcEngine.EmCcObligorEngine+ObligorSpreadData]'.
* * at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at Devart.Data.Linq.DataProvider.a(c1 A_0, IDbConnection A_1, IDataReader A_2)
at Devart.Data.Linq.DataProvider.a(c1 A_0, Object[] A_1)
at Devart.Data.Linq.Engine.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
SCG.TAG.GES.RiskLimit.CalcEngine.CcObligorEngine+ObligorSpreadData
vs
SCG.TAG.GES.RiskLimit.CalcEngine.EmCcObligorEngine+ObligorSpreadData
The last working version was dcoracle84pro = Version 8.4.254 (25-Sep-2014)
Stack trace:
Object of type 'Devart.Data.Linq.Engine.ObjectReader`1[SCG.TAG.GES.RiskLimit.CalcEngine.CcObligorEngine+ObligorSpreadData]' cannot be converted to type 'System.Collections.Generic.IEnumerator`1[SCG.TAG.GES.RiskLimit.CalcEngine.EmCcObligorEngine+ObligorSpreadData]'.
* * at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at Devart.Data.Linq.DataProvider.a(c1 A_0, IDbConnection A_1, IDataReader A_2)
at Devart.Data.Linq.DataProvider.a(c1 A_0, Object[] A_1)
at Devart.Data.Linq.Engine.DataQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Please provide us with the following information:
- the exact version of dotConnect for Oracle;
- the DDL scripts for the necessary database tables;
- the definitions of the DataContext, entity classes (e.g., send us the model with the *.Designer.cs file);
- the code snippet for reproducing the issue, etc.
If possible, please create and send us a small test project, with which this issue is reproducible. This will significantly speed up the process of determining the cause of the error and finding the solution for it.
Looking forward to your reply.
- the exact version of dotConnect for Oracle;
- the DDL scripts for the necessary database tables;
- the definitions of the DataContext, entity classes (e.g., send us the model with the *.Designer.cs file);
- the code snippet for reproducing the issue, etc.
If possible, please create and send us a small test project, with which this issue is reproducible. This will significantly speed up the process of determining the cause of the error and finding the solution for it.
Looking forward to your reply.
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Sent the project/script as requested.
In essence, the sample looks like
In essence, the sample looks like
Code: Select all
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using DAL.Context;
namespace DotConnectBug001
{
internal class Program
{
#region <<< Private methods >>>
private static void Main()
{
//Works with 8.4.254.0
using (var tmpTestContext = new TestContext())
{
List<Class1.InternalClass> tmpList1 =
tmpTestContext.Test001s.Select(inTest => new Class1.InternalClass {Id = inTest.Id, Name = inTest.Name,}).ToList();
List<Class2.InternalClass> tmpList2 =
tmpTestContext.Test001s.Select(inTest => new Class2.InternalClass {Id = inTest.Id, Name = inTest.Name,}).ToList();
Debug.Assert(tmpList1 != null);
Debug.Assert(tmpList2 != null);
Debug.Assert(tmpList1.Count == 2);
Debug.Assert(tmpList2.Count == 2);
}
}
#endregion
}
internal class Class1
{
#region <<< Nested type: InternalClass >>>
internal class InternalClass
{
#region <<< Public properties >>>
public Int32? Id { get; set; }
public String Name { get; set; }
#endregion
}
#endregion
}
internal class Class2
{
#region <<< Nested type: InternalClass >>>
internal class InternalClass
{
#region <<< Public properties >>>
public Int32? Id { get; set; }
public String Name { get; set; }
#endregion
}
#endregion
}
}
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Thank you for the response. We have reproduced the issue. We will investigate the issue more clearly and inform you about the results as soon as possible.
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
We have fixed this issue. The fix will be included in the next public build of dotConnect for Oracle, which we plan to release in several days. We will post here when it is available for download.
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
New build of dotConnect for Oracle 8.4.447 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=32065.
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=32065.
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
This issue has been fixed; although there is(are) more to address before I can use the latest version.
Would it be possible to obtain a version of installation based on Version 8.4.254 (25-Sep-2014) which can be used in VS 2015? Meanwhile I'll try to create a test project that replicates the issue (which unfortunately may take several WEEKS).
Or maybe there is a way to make the dcoracle84pro = Version 8.4.254 (25-Sep-2014) package to be compatible with the VS 2015 so I will not get the
Assembly (xyz) is not licensed to use dotConnect for Oracle.
Thanks!
Would it be possible to obtain a version of installation based on Version 8.4.254 (25-Sep-2014) which can be used in VS 2015? Meanwhile I'll try to create a test project that replicates the issue (which unfortunately may take several WEEKS).
Or maybe there is a way to make the dcoracle84pro = Version 8.4.254 (25-Sep-2014) package to be compatible with the VS 2015 so I will not get the
Assembly (xyz) is not licensed to use dotConnect for Oracle.
Thanks!
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
We don't make patches. New functionality and bug fixes are included into new builds of dotConnect for Oracle.Would it be possible to obtain a version of installation based on Version 8.4.254 (25-Sep-2014) which can be used in VS 2015?
If you have a valid subscription for dotConnect for Oracle, you can download the latest version of dotConnect for Oracle from Registered Users' Area.
The subscription is valid during one year since the purchase of dotConnect for Oracle or renewing the subscription.
If your subscription is not valid, you have to renew your subscription and download the latest version of dotConnect for Oracle.
We are looking forward to your reply with a sample project for reproducing the issues.Meanwhile I'll try to create a test project that replicates the issue (which unfortunately may take several WEEKS).
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
OK, sorry for the delay, but I finally managed to create another project for broken functionality.
Again, the code works with 8.4.254.0, but does not with all the consequent versions.
Looking for your response.
Thanks!
Again, the code works with 8.4.254.0, but does not with all the consequent versions.
Looking for your response.
Thanks!
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Unfortunately, we didn't receive response from you. Probably, your letter was blocked for some reason (i.e. the attachment, etc.).but I finally managed to create another project for broken functionality.
Please re-send your letter again. Also, please send it to 'mariiai at devart dot com'.
As an alternative, you can upload your project to some file exchange server and give us a download link.
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
We still didn't receive anything from you.
Please specify whether you have sent us the letter via our contact form ( http://www.devart.com/company/contact.html) or directly to support at devart dot com. Please also specify the e-mail address from which the letter was sent.
Please specify whether you have sent us the letter via our contact form ( http://www.devart.com/company/contact.html) or directly to support at devart dot com. Please also specify the e-mail address from which the letter was sent.
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
Project http://motuzko.com/obsilf/Downloads/Dot ... Bug002.rar
DDL - Script.sql - is in the archive
DDL - Script.sql - is in the archive
Re: Looks like the LinqConnect library gets confused when materializing objects with the same name nested in different types
As for the e-mail, here's what I got yesterday