Skip to content

Error while GenerateModel with table has sequence without suffix seq #5112

@longbui98

Description

@longbui98

Hi team,

While working with library, I have seen that in case of creating table in PostgreSQL with sequence without suffix seq. EX:

Image

Then, when we run code to generate model in PostgreSQL, we have an error is related to parse error as below:

Image

The reason for above error is related to parse default value it is "nextval('gr_site_test_info_id'" in generate.go at line 244 as below. While, the default value must not be like that:
Image

So, in the source code, I have seen that it pass value when the seq must be followed format as below:
Image

So, I would like to request team to double check again about this issue from your side to verify whether we need to check format must be suffix that includes seq or not

Thanks in advance. !!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions