Skip to content

Join columns javadoc clarification - #1233

Merged
gavinking merged 7 commits into
jakartaee:mainfrom
gavinking:join-columns-javadoc-clarification
Nov 26, 2026
Merged

gavinking merged 7 commits into
jakartaee:mainfrom
gavinking:join-columns-javadoc-clarification

Conversation

@gavinking

Copy link
Copy Markdown
Member

Clean up inconsistencies in the javadoc of @XxxxJoinColumns.

@marko-bekhta marko-bekhta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found a few other places where we are talking about join columns but do not mention the rule for >1 and was unsure if we should or not 🙂. I'll let you decide 🙇🏻
Other than that -- looks good 👍🏻

* <p>Since {@code @MapKeyJoinColumn} is a repeatable annotation,
* it's not usually necessary to specify {@code @MapKeyJoinColumns}
* explicitly. However, {@code @MapKeyJoinColumns} is useful for
* controlling generation of composite foreign key constraints.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have that snippet with an example for join columns:

* @ManyToOne
* @JoinColumns(
* value = {@JoinColumn(name = "ADDR_ID", referencedColumnName = "ID"),
* @JoinColumn(name = "ADDR_ZIP", referencedColumnName = "ZIP")},
* foreignKey = @ForeignKey(name = "PERSON_ADDRESS_FK"))
* public Address getAddress() { return address; }
* }

would it be worth having one here as well ?

@gavinking
gavinking force-pushed the join-columns-javadoc-clarification branch from 93a6dcf to 47aaaa7 Compare November 25, 2026 14:05

@marko-bekhta marko-bekhta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

@gavinking

Copy link
Copy Markdown
Member Author

Thank you, @marko-bekhta

@gavinking
gavinking merged commit 1c655ae into jakartaee:main Nov 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants