Skip to content

Make it configurable if the table annotation on an entity affects the column name of the foreign key reference to that table #1161

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

Closed
schauder opened this issue Feb 8, 2022 · 0 comments
Labels
type: enhancement A general enhancement

Comments

@schauder
Copy link
Contributor

schauder commented Feb 8, 2022

See #1147

This should be configurable.
The default should be the old behavior.
Names specified in MappedCollection should override any default.

@schauder schauder added this to the 2.4 M3 (2021.2.0) milestone Feb 8, 2022
@mp911de mp911de removed this from the 2.4 M3 (2021.2.0) milestone Feb 18, 2022
schauder added a commit that referenced this issue Sep 7, 2022
The default version is the behaviour that existed so far:
The back reference is the table name as generated by the `NamingStrategy` without taking `@Table` annotations into account.

The new alternative is to take `@Table` into account.

The behaviour can be configured by setting the `foreignKeyNaming` property on the `RelationalMappingContext`.

Closes #1161
Closes #1147
mp911de pushed a commit that referenced this issue Oct 5, 2022
The default version is the behavior that existed so far:
The back reference is the table name as generated by the `NamingStrategy` without taking `@Table` annotations into account.

The new alternative is to take `@Table` into account.

The behavior can be configured by setting the `foreignKeyNaming` property on the `RelationalMappingContext`.

Closes #1161
Closes #1147
@mp911de mp911de changed the title Make it configurable if the table annotation on an entity affects the column name of the foreign key reference to that table. Make it configurable if the table annotation on an entity affects the column name of the foreign key reference to that table Oct 7, 2022
@mp911de mp911de added the type: enhancement A general enhancement label Oct 7, 2022
@mp911de mp911de added this to the 3.0 RC1 (2022.0.0) milestone Oct 7, 2022
@mp911de mp911de closed this as completed in 40446f9 Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants