Hello,
we are using \.nuget\packages\devart.data.oracle.efcore\9.7.805
We are using working on a model first relational database model.
We are creating and migrating the database with "dotnet ef" commands in package-manager-console.
When we use "Update database from Model" for looking at the generated script there are many differences between the database and the model. much more differences than in the ef generated migration class.
for example:
In the generated script form Devart Entity Developer we found:
-- Script was generated by Devart Entity Developer, Version 6.4.790.0
-- Script date 13.11.2019 15:36:10
-- Target Server: Oracle
-- Server Version:
--
-- Altering a table NPS."WiegescheinAnhang"
--
ALTER TABLE NPS."WiegescheinAnhang"
DROP CONSTRAINT "FK_WiegescheinAnha_01534592935";
Now looking at the Table "WiegescheinAnhang" there is no Constraint with that name but one named "FK_WiegescheinAnhang_Wiegeschein_WiegescheinId" which is correct because we have set TruncateLongDefaultNames to false:
public partial class TocanNpsModel
{
partial void CustomizeConfiguration(ref DbContextOptionsBuilder optionsBuilder)
{
OracleEntityProviderConfig.Instance.CodeFirstOptions.TruncateLongDefaultNames = false;
}
"dotnet ef migrations add xxx" generates the correct FK Name. Entity developer does not.
Is this a bug or did we miss something?
Regards
Thomas
FK names problem
-
- Posts: 5
- Joined: Tue 21 Aug 2018 09:47
Re: FK names problem
Hello devart team,
anyone has an answer to this?
Thomas
anyone has an answer to this?
Thomas
Re: FK names problem
The version of your Oracle Server is 12.2 or higher, isn't it?
We have reproduced the issue with truncating long names to 30 symbols by Entity Developer for Oracle Server 12.2 and higher. We will notify you when the problem is fixed.
We have reproduced the issue with truncating long names to 30 symbols by Entity Developer for Oracle Server 12.2 and higher. We will notify you when the problem is fixed.
Re: FK names problem
dotConnect for Oracle v9.10.909 includes the following fixes:
* The 12cR2 option is added to the list of available Oracle versions in Model Synchronization Settings
* The bug with truncating long names to 30 symbols for Oracle Server 12.2 and higher by Update To Database Wizard / Generate Database Script Wizard is fixed
Refer to viewtopic.php?f=1&t=39716.
* The 12cR2 option is added to the list of available Oracle versions in Model Synchronization Settings
* The bug with truncating long names to 30 symbols for Oracle Server 12.2 and higher by Update To Database Wizard / Generate Database Script Wizard is fixed
Refer to viewtopic.php?f=1&t=39716.