Inheritance problem

Inheritance problem

Postby luigisaggese » Thu 19 Jan 2012 09:01

Hi ,
We have an this problem with a datacontext.

We found the same problem in the following topics with dotConnect for MySql:

http://www.devart.com/forums/viewtopic. ... f615fbe8c1

This is our DataContext:

Image

This is the Stored procedure call, GetThreadById, which we have in ThreadDataContext.ThreadDataContext.cs file (generated by Devart)

Code: Select all
public System.Data.Linq.ISingleResult GetThreadById(System.Nullable pidthread)
        {
            IExecuteResult _GetThreadByIdResult = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), pidthread);
            return ((System.Data.Linq.ISingleResult)(_GetThreadByIdResult.ReturnValue));
        }


The raised exception by:
Code: Select all
IExecuteResult _GetThreadByIdResult = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), pidthread);


Is this:
The binary operator Equal is not defined for the types ‘System.Nullable`1[System.Int32] ' and 'System.Int32'
luigisaggese
 
Posts: 17
Joined: Fri 04 Nov 2011 16:43
Location: Italia

Postby StanislavK » Thu 19 Jan 2012 13:16

Could you please specify the following:
- the inheritance type (TPT or TPH) you've implemented in your model;
- whether any specific modifiers (e.g., 'abstract') are set on the base class;
- the version of dotConnect for MySQL you are using;
- the stack trace of the exception.

If possible, please send us a model or a sample application with which the issue occurs.

At the moment, we couldn't reproduce the problem in our environment.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby luigisaggese » Thu 19 Jan 2012 14:14

StanislavK wrote:Could you please specify the following:
- the inheritance type (TPT or TPH) you've implemented in your model;
- whether any specific modifiers (e.g., 'abstract') are set on the base class;
- the version of dotConnect for MySQL you are using;
- the stack trace of the exception.

If possible, please send us a model or a sample application with which the issue occurs.

At the moment, we couldn't reproduce the problem in our environment.



- the inheritance type (TPT or TPH) you've implemented in your model; TPH
- whether any specific modifiers (e.g., 'abstract') are set on the base class; NO
- the version of dotConnect for MySQL you are using; 6.50.244.0
- the stack trace of the exception.

System.InvalidOperationException was unhandled by user code
Message=L'operatore binario Equal non è definito per i tipi 'System.Nullable`1[System.Int32]' e 'System.Int32'.
Source=System.Core
StackTrace:
in System.Linq.Expressions.Expression.GetEqualityComparisonOperator(ExpressionType binaryType, String opName, Expression left, Expression right, Boolean liftToNull)
in System.Linq.Expressions.Expression.Equal(Expression left, Expression right)
in Devart.Data.Linq.Provider.h.a(be A_0)
in Devart.Data.Linq.Provider.j.a(be A_0)
in Devart.Data.Linq.Provider.h.a(SqlExpression A_0)
in Devart.Data.Linq.Provider.h.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(IDataServices A_0, SqlExpression A_1)
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.BuildQuery(Expression query)
in Devart.Data.Linq.Provider.DataProvider.Devart.Data.Linq.Provider.IProvider.Execute(Expression query)
in Devart.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)
in Merqurio.DottNetCore.Core.Domain.MySQL.ThreadDataContext.GetThreadById(Nullable`1 pidthread) in C:\Projects\dottnet
luigisaggese
 
Posts: 17
Joined: Fri 04 Nov 2011 16:43
Location: Italia

Postby StanislavK » Fri 20 Jan 2012 17:03

I've sent you a test project, please check that it is not blocked by your mail filter. Please specify what should be changed in the test project or database scripts to reproduce the issue, or send us your sample.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby StanislavK » Tue 24 Jan 2012 16:35

Thank you for the sample, we have reproduced the issue. We will analyze it and inform you as soon as it is fixed.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Postby luigisaggese » Wed 11 Apr 2012 15:26

Any news?
luigisaggese
 
Posts: 17
Joined: Fri 04 Nov 2011 16:43
Location: Italia

Postby StanislavK » Thu 12 Apr 2012 14:46

We've recently performed substantial refactoring of the LinqConnect runtime. In particular, these changes have fixed the issue discussed in this thread. Please try using the LinqConnect 4.0.5 Beta build, and tell us if this helps. The Beta trial can be downloaded from
http://www.devart.com/linqconnect/download.html

Or you can wait for the LinqConnect 4 release, which we plan to publish in about two weeks.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for MySQL