we are moving from Nhibernate to devart DoConnect for Oracle with Entity Framework Core on an legacy database (oracle 12c). Our query provider is automapper.
Actually we have a problem with a query joining a composite key entity.
Code: Select all
CREATE TABLE TblParameter
( "ParameterPosition" NUMBER(10,0),
"MesurementProgramGroupId" NUMBER(10,0) NOT NULL ENABLE,
...)
Code: Select all
CREATE TABLE TblBoxParameterToParameter"
( "BoxParameterId" RAW(16) NOT NULL ENABLE,
"MesurementProgramGroupId" NUMBER(10,0) NOT NULL ENABLE,
"ParameterPosition" NUMBER(10,0) NOT NULL ENABLE,
"Position" NUMBER(9,0) NOT NULL ENABLE)
CONSTRAINT "TblBoxParameterToParameter_PK" PRIMARY KEY ("BoxParameterId", "MesurementProgramGroupId", "ParameterPosition") ENABLE,
CONSTRAINT "TblBoxParamToParam_FK" FOREIGN KEY ("MesurementProgramGroupId", "ParameterPosition")
REFERENCES TblParameter ("MesurementProgramGroupId", "ParameterPosition") ENABLE
Let AutoMapper join the entities results in the following sql query:
Code: Select all
SELECT "x".POSITION,
[b]"x".MesurementProgramGroupId IS NOT NULL OR "x".ParameterPosition IS NOT NULL[/b],
"x.Parameter".MesurementProgramGroupId,
"x.Parameter".ParameterPosition,
...
FROM TblBoxParameterToParameter "x"
INNER JOIN TblParameter "x.Parameter" ON ("x".MesurementProgramGroupId= "x.Parameter".ParameterPosition) AND ("x".ParameterPosition= "x.Parameter".MesurementProgramGroupId)
WHERE "x".BoxParameterId = :p__bpId_0
Code: Select all
"x".MesurementProgramGroupId IS NOT NULL OR "x".ParameterPosition IS NOT NULL
Can anyone tell me how to avoid this problem?
Thanks,
Butzei