ORA-00972: identifier is too long

ORA-00972: identifier is too long

Postby Butzei » Tue 30 May 2017 09:10

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
Butzei
 
Posts: 9
Joined: Fri 26 May 2017 07:41

Re: ORA-00972: identifier is too long

Postby Shalex » Wed 31 May 2017 16:38

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.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44

Re: ORA-00972: identifier is too long

Postby powelerl » Wed 31 May 2017 17:04

This could be a known EF Core issue.

https://github.com/aspnet/EntityFramework/issues/8255
powelerl
 
Posts: 9
Joined: Thu 22 Dec 2016 10:00

Re: ORA-00972: identifier is too long

Postby Butzei » Thu 01 Jun 2017 13:19

@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?
Butzei
 
Posts: 9
Joined: Fri 26 May 2017 07:41

Re: ORA-00972: identifier is too long

Postby Shalex » Fri 02 Jun 2017 16:19

@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.
Shalex
Devart Team
 
Posts: 7460
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle