Page 1 of 1

Updated Version (9.5) creating invalid sql

Posted: Mon 06 Nov 2017 17:43
by utahking
When projecting a linq query to to a DTO in a select clause like this:

Code: Select all

var settings = from setting in context.AppSettings
select new AppSettingsDto {
  ReallyLongPropertyNameInDtoClass = setting.ReallyLongProperty
};
var results = settings.ToArray() //This is where the error occurs
This creates an alias in the generated Sql for ReallyLongProperty that is too long (32):

Code: Select all

SELECT "setting".REALLY_LONG_PROPERTY AS "ReallyLongPropertyNameInDtoClass"
FROM SCHEMA.APP_SETTINGS "setting"
This results in a ORA-00972: identifier is too long.

This is just pseudocode, I can send concrete examples if necessary.

Thanks.

Re: Updated Version (9.5) creating invalid sql

Posted: Tue 07 Nov 2017 18:18
by Shalex
Please upload a small test project with the corresponding DDL/DML script to ftp://ftp.devart.com (credentials: anonymous / yourEmail).

Re: Updated Version (9.5) creating invalid sql

Posted: Fri 10 Nov 2017 15:32
by Shalex
The bug with generating SQL aliases in EF Core 2 is fixed. We will notify you when the new build of dotConnect for Oracle is available for download.

Re: Updated Version (9.5) creating invalid sql

Posted: Thu 23 Nov 2017 11:58
by RoyLane
Shalexe wrote:The bug with generating SQL aliases in EF Core 2 is fixed. We will notify you when the new build of dotConnect for Oracle is available for download.
Is the new dl out yet Shalex?

Re: Updated Version (9.5) creating invalid sql

Posted: Fri 24 Nov 2017 09:54
by Shalex
New build of dotConnect for Oracle 9.5.399 is available for download: viewtopic.php?f=1&t=36257.