Efml Update from database, column NEXT VALUE

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
ruda
Posts: 17
Joined: Sat 29 Mar 2014 17:10

Efml Update from database, column NEXT VALUE

Post by ruda » Mon 02 May 2022 13:24

Version: 6.12.1419

I detected a problem, to occur was like this:

I have a table with a column that has a string. Not the Identity column.

The default field contains the value: NEXT VALUE FOR [dbo].[sqTable]

When updating the model, it correctly identifies and puts the Generated Value as OnAdd and my Model setting sets it to private.

All right. The problem is that it always updates this field when I try to update the model from the database.

In the description of the database update, the field always appears: Identity(old='True', new='False') was changed.

This makes it difficult to really know what was modified in the database, having to go table by table in the listing to verify.

Shalex
Site Admin
Posts: 9516
Joined: Thu 14 Aug 2008 12:44

Re: Efml Update from database, column NEXT VALUE

Post by Shalex » Thu 05 May 2022 10:44

We cannot reproduce the problem with the following table:

Code: Select all

CREATE SEQUENCE [dbo].[Forum57216_sequence] AS [bigint]
GO

CREATE TABLE Forum57216(
Id int Primary Key,
c1 varchar DEFAULT NEXT VALUE FOR [dbo].[Forum57216_sequence]
)
GO
Please specify the DDL script of a test table and related database objects required for reproducing the issue.

ruda
Posts: 17
Joined: Sat 29 Mar 2014 17:10

Re: Efml Update from database, column NEXT VALUE

Post by ruda » Mon 09 May 2022 12:39

I did like this:

Code: Select all

CREATE DATABASE Test57216
GO

USE Test57216
GO

CREATE SEQUENCE [dbo].[Forum57216_sequence] AS [int]
GO

CREATE TABLE Forum57216(
Forum57216Id int Primary Key,
Id int DEFAULT NEXT VALUE FOR [dbo].[Forum57216_sequence]
)
GO
I created a new model and made an update to add the table.
Then I did the update again and it alerts that the column has been modified.
If I do the update again, the same alert of the modified column appears (it doesn't come out of it).

ImageImageImage

ruda
Posts: 17
Joined: Sat 29 Mar 2014 17:10

Re: Efml Update from database, column NEXT VALUE

Post by ruda » Mon 09 May 2022 12:43

I ended up doing the test with the varchar field for the NEXT VALUE and had no problem.
But if it is an integer field (bigint, int...) the problem occurs.

Shalex
Site Admin
Posts: 9516
Joined: Thu 14 Aug 2008 12:44

Re: Efml Update from database, column NEXT VALUE

Post by Shalex » Thu 12 May 2022 12:13

ruda wrote: Mon 09 May 2022 12:43 But if it is an integer field (bigint, int...) the problem occurs.
Thank you for your report. We have reproduced the issue and will notify you when it is fixed.

Mariarivera
Posts: 1
Joined: Fri 17 Jun 2022 10:13

Re: Efml Update from database, column NEXT VALUE

Post by Mariarivera » Fri 17 Jun 2022 10:16

Thank you for your report. We have reproduced the issue and will notify you when it is fixed.
slope 2 unblocked

Post Reply