PostgreSQL Sequence not created correctly for serial using Model First

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

PostgreSQL Sequence not created correctly for serial using Model First

Post by OutOfTouch6947 » Fri 17 Feb 2017 23:46

Hi,

I might be doing something wrong, if I am please let me know, but it appears that the serial sequence is created as a bigserial sequence when using model first approach.

In the entity designer I checked the Auto Generated Value and made the dotnet type Int32 and the server type int4 for some tables and for some other tables I used dotnet type Int64 and bigint for the server type.

The problem is all the sequences were created with a max value of 9223372036854775807 instead of 2147483647 for the int4.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: PostgreSQL Sequence not created correctly for serial using Model First

Post by OutOfTouch6947 » Mon 20 Feb 2017 19:14

This appears to be a misunderstanding on my part of PostgreSql, even when I create table in PostgreSql with a column as serial, the sequence created has the same value for max as bigserial according to the postgresql documentation: https://www.postgresql.org/docs/9.1/sta ... meric.html

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

Re: PostgreSQL Sequence not created correctly for serial using Model First

Post by Shalex » Tue 21 Feb 2017 17:56

Thank you for letting us know.

Post Reply