[
https://issues.jboss.org/browse/FORGE-1115?page=com.atlassian.jira.plugin...
]
Vineet Reynolds edited comment on FORGE-1115 at 8/16/13 2:23 PM:
-----------------------------------------------------------------
Since code generation of business services may rely on this, it would be necessary to
determine whether the pattern is implemented. This would have to wait until method bodies
can be parsed to determine if the inverse fields are referenced in the desired manner.
A non-deterministic way would involve parsing some of the code like method signatures,
javadoc comments etc., to heuristically determine if the pattern is implemented.
was (Author: vineet.reynolds):
Since code generation of business services may rely on this, it would be necessary to
determine whether the pattern is implemented. This would have to wait until method bodies
can be parsed to determine if the inverse fields are referenced in the desired manner.
A non-deterministic way would involve parsing some of the code like method signatures, to
heuristically determine if the pattern is implemented.
Generate code in JPA entities to implement the mutual registration
pattern
--------------------------------------------------------------------------
Key: FORGE-1115
URL:
https://issues.jboss.org/browse/FORGE-1115
Project: Forge
Issue Type: Feature Request
Components: Builtin Plugins
Affects Versions: 1.3.3.Final
Reporter: Vineet Reynolds
Fix For: 1.x Future, 2.x Future
It would be preferable to generate code to implement [the mutual registration
pattern|http://www.two-sdg.demon.co.uk/curbralan/papers/MutualRegistration.pdf]. This
would ensure that changes to bidirectional relationships are propagated through methods
invoked on the JPA entity, instead of delegating this logic to the business services. Not
implementing this, would result in [object corruption
issues|http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Object...].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira