Page 1 of 1

ORA-00972: identifier is too long

Posted: Tue 30 May 2017 09:10
by Butzei
Hi,

I have another problem while moving from NHibernate to DotConnect with EfCore. We have DotConnect 9.4.280 running against an existing Oracle 11g Database (Database First).

Now I have trouble with the length of the identifier generated by DocConnect.

Code: Select all

SELECT "vo".VisualControlId,
        "vo".messfolgeid,
        "vo".Series
FROM  TblVisControl"vo"
       inner join TblMeasurementSequence "vo.measurementsequence"
               ON "vo".MeasurementSequenceId= "vo.measurementsequence".MeasurementSequenceId
       inner join TblSequence "vo.measurementsequence.sequence"
               ON ( "vo.measurementsequence".TestId= "vo.measurementsequence.sequence".TestId) AND
                  ( "vo.measurementsequence".SequenceNumber = "vo.measurementsequence.sequence".Number)
WHERE  "vo.measurementsequence.sequence".SequenceId= :p__sequenceId_0
ORDER  BY "vo".Series
With a length of 31 characters "vo.measurementsequence.sequence" is too long for oracle.

To solve this issue I tried TruncateLongDefaultNames witch had no effect on the generated SQL query.

Code: Select all

            var config = OracleEntityProviderConfig.Instance;
            config.CodeFirstOptions.TruncateLongDefaultNames = true;
            config.CodeFirstOptions.UseNonLobStrings = true;
Did I miss any other configuration to shorten these identifieres?

Thanks,
Butzei

Re: ORA-00972: identifier is too long

Posted: Wed 31 May 2017 16:38
by Shalex
Please upload a small test project with the corresponding DDL/DML script for reproducing to our ftp server (ftp://ftp.devart.com/, credentials: anonymous/anonymous ) or to any file exchange server so that we could download it from there.

Re: ORA-00972: identifier is too long

Posted: Wed 31 May 2017 17:04
by powelerl
This could be a known EF Core issue.

https://github.com/aspnet/EntityFramework/issues/8255

Re: ORA-00972: identifier is too long

Posted: Thu 01 Jun 2017 13:19
by Butzei
@Shalex: I uploaded a "Butzei_Devart.Demo.zip" containing a example solution to your server. Thank you for your investigations.

@powelerl: Thank you for your hint. I tried an upgrade to the mentioned EfCore 2 Preview 1 which doesn't work with dotconnect. Do you know any workaround or is the only chance to wait for a release of efcore and dotconnect solving this problem?

Re: ORA-00972: identifier is too long

Posted: Fri 02 Jun 2017 16:19
by Shalex
@powelerl: Thank you for the link.

@Butzei: Thank you for the project. The issue is exactly the same like described at https://github.com/aspnet/EntityFramework/issues/8255. The fix will be provided with EF Core 2 support. We are investigating the possibility to provide a fix for EF Core.

As a temporary workaround, please use shorter names.

Re: ORA-00972: identifier is too long

Posted: Mon 30 Oct 2017 19:22
by Shalex
Entity Framework Core 2.0 is supported: viewtopic.php?f=1&t=36128.

Be aware that starting from Entity Framework Core 2.0 the Scaffold-DbContext functionality (Devart.Data.Oracle.EFCore.Design.dll) is included in the Devart.Data.Oracle.EFCore package.