Forum Stats

  • 3,854,238 Users
  • 2,264,344 Discussions


Oracle EF Core 6 incorrectly truncating long column identifiers in generated queries

User_DGS09 Member Posts: 2 Green Ribbon
edited Jul 28, 2022 6:13AM in ODP.NET


I am trying to migrate an existing app from Oracle EF Core 2.19.60 to the latest 6.21.61 (using 19c DB).

We have many tables with column identifiers longer than 30 characters. All columns are explicitly annotated with their names in the C# entities. Oracle compatibility is set to version 12, and max identifier length is the default 128bytes.

The generated queries involving these long column names work correctly in the older Oracle EF Core Version, but using the latest EFC6, they are automatically truncated to 30 characters, and given a random postfix. This breaks the queries because these truncated identifiers do not exist in the database.

Am I missing some new required configuration to stop Oracle EF Core unnecessarily truncating column identifiers in the queries it generates?


  • Alex Keh-Oracle
    Alex Keh-Oracle Posts: 3,129 Employee

    It could be a bug. Do you have a simple test case demonstrating the behavior that Oracle can take a look at to debug? MaxIdentifierLength is supposed to dictate the schema object name length. Perhaps there is some new, unexpected interaction in the new EFC6 update in specific scenarios.

  • User_DGS09
    User_DGS09 Member Posts: 2 Green Ribbon

    Apologies Alex, on further investigation, the Oracle compatibility was being incorrectly set back to 11 in a different part of the application. After fixing this, everything behaves as expected.