-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Generate additional setters for foreign keys, accepting records as arguments #1510
Comments
Author: @digulla
|
Author: @digulla
|
Thanks for the contribution. Nice thinking, relating this to the generation of fetch methods. In a way, this can be seen as "foreign key navigation", indeed. I will fix some issues and commit this for the upcoming release. The issues are:
|
Implemented this for single-column foreign keys.
|
Remaining features (multi-column FK's): #1539 |
Author: @digulla
might make sense from a jOOQ point of view but it exposes details about the implementation (that you use the ID columns).
says "connect those two instances" but not how. Would it really be that hard to add to the existing strategy? |
I like this solution better for two reasons:
The latter is important, specifically if X has only one reference to Y at first, but then another reference gets added later. If the method name would be changed, then client code would break. |
... short of reliable heuristics, I suggest that "more clever" naming patterns are left to client code, once this is properly supported in naming strategies. |
This feature will be removed again in jOOQ 3.0. Name mangling schemes are pretty tough to handle... See also #2137, where this feature here introduces regressions in core jOOQ behaviour, where record setters are already reserved for UDT records |
As discussed here:
https://groups.google.com/d/topic/jooq-user/QWrHYv7bIt0/discussion
The text was updated successfully, but these errors were encountered: