Page 1 of 1

Losing property name after updating model

Posted: Mon 09 May 2022 14:42
by ruda
Version: 6.12.1419
EF Core

I detected a problem, to occur was like this:

Code: Select all

CREATE DATABASE TestED
GO

USE TestED
GO

CREATE TABLE [dbo].[TableA]
(
[TableAId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1)
)
GO

CREATE TABLE [dbo].[TableB]
(
[TableBId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1),
[TableAId] [int] NOT NULL,
[TableAId_Other] [int] NULL
)
GO

ALTER TABLE [dbo].[TableB] ADD CONSTRAINT [FK_TableB_TableA] FOREIGN KEY ([TableAId]) REFERENCES [dbo].[TableA] ([TableAId])
GO
ALTER TABLE [dbo].[TableB] ADD CONSTRAINT [FK_TableB_TableA_Other] FOREIGN KEY ([TableAId_Other]) REFERENCES [dbo].[TableA] ([TableAId])
GO

CREATE TABLE [dbo].[TableC]
(
[TableCId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1),
)
GO
I add to the model TabelA and TableT.
I rename the two navigation properties to TableA and TableAOther

Image Image Image

If I immediately add the TableC, the problem does not occur.

But if I close the model and open it again, and add the TableC or have any changes in the database and want to update, I lose the changes I made to the name.

This is a huge bug.
I have over 500 tables and with the navigation properties renamed and if I update anything in the layout I totally get close to the work I've done.

This happened the first time. I saved it, closed it and remembered that I needed to add a field.
Soon after I adjusted and lost everything I had done.

Re: Losing property name after updating model

Posted: Thu 12 May 2022 16:24
by Shalex
ruda wrote: Mon 09 May 2022 14:42 If I immediately add the TableC, the problem does not occur.

But if I close the model and open it again, and add the TableC or have any changes in the database and want to update, I lose the changes I made to the name.
Thank you for your report. We have reproduced the issue and will notify you when it is fixed.

Re: Losing property name after updating model

Posted: Tue 27 Sep 2022 14:33
by fabien.menager
Do you have an ETA for this fix ?

Re: Losing property name after updating model

Posted: Fri 07 Oct 2022 10:05
by Shalex
The investigation is in progress. We cannot provide a timeframe at the moment.