Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow omitting value generation via convention when scaffolding #11005

Open
Tracked by #22948
roji opened this issue Feb 19, 2018 · 1 comment
Open
Tracked by #22948

Allow omitting value generation via convention when scaffolding #11005

roji opened this issue Feb 19, 2018 · 1 comment

Comments

@roji
Copy link
Member

roji commented Feb 19, 2018

AnnotationsCodeGenerator currently allows to specify that a given annotation shouldn't be code-generated, since it is by-convention. However, the same isn't true of other, non-annotation settings such as value generation.

More concretely, PostgreSQL supports several methods of database-generated autoincrement values - serial (simple column backed by a sequence), and since PostgreSQL 10 also identity (with two variants, always and by default). NpgsqlValueGenerationStrategy has all these options and there are property builders for specifying them. The problem is that when scaffolding an identity column, in addition to the UseNpgsqlIdentityByDefaultColumn() property builder method, ValueGeneratedOnAdd() is generated, although the latter should be implied by the former.

This is obviously a very non-urgent issue.

@bricelam
Copy link
Contributor

👍 We hit the same problem in #10183 where SQL Server adds index filters by convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants