Page 1 of 1

Invalid SQL is being generated by dotConnect for Oracle (EFCore)

Posted: Wed 30 Jan 2019 23:31
by jwobbe.oya
The following invalid SQL is being generated by dotConnect for Oracle

SELECT "$it".JJIS_NUMBER AS "Value0", "$it".YOUTH_ID AS "Value"
FROM OYA.YOUTH "$it"
ORDER BY DBMS_LOB.SUBSTR("$it"."Value0"), "Value"
FETCH FIRST :p__TypedProperty_0 ROWS ONLY

This leads to the following exception: Devart.Data.Oracle.OracleException (0x80004005): ORA-00904: "$it"."Value0": invalid identifier

To reproduce
1. Clone or download https://github.com/jwobbeoya/ReproDevartBug

2. Create the youth table with the Youth.sql script in the Ddl folder. The schema expected is OYA, but that can be changes if you update the schema in Consts.cs

3. Update appsetting.json with your connection string

4. Starting / Debugging the app with will cause invalid query to be generated

Re: Invalid SQL is being generated by dotConnect for Oracle (EFCore)

Posted: Fri 01 Feb 2019 18:56
by Shalex
Thank you for your report. We have reproduced the issue and will notify you when it is fixed.

Re: Invalid SQL is being generated by dotConnect for Oracle (EFCore)

Posted: Mon 18 Feb 2019 12:23
by Shalex
The bug with sorting by CLOB/NCLOB column in EF Core is fixed: viewtopic.php?f=1&t=38378.