[
https://issues.jboss.org/browse/FORGE-397?page=com.atlassian.jira.plugin....
]
Lincoln Baxter III closed FORGE-397.
------------------------------------
Assignee: Lincoln Baxter III
Fix Version/s: 1.0.0.Beta4
Resolution: Done
PersistencePlugin does not mark one side of a OneToOne as
'mappedBy'
--------------------------------------------------------------------
Key: FORGE-397
URL:
https://issues.jboss.org/browse/FORGE-397
Project: Forge
Issue Type: Enhancement
Reporter: Richard Kennard
Assignee: Lincoln Baxter III
Fix For: 1.0.0.Beta4
The PersistencePlugin currently generates OneToOne relationships like this:
@OneToOne
private Profile profile;
public Profile getProfile() {
return this.profile;
}
public void setProfile(final Profile profile) {
this.profile = profile;
}
...and...
@OneToOne
private Customer customer;
public Customer getCustomer() {
return this.customer;
}
public void setCustomer(final Customer customer) {
this.customer = customer;
}
Ideally one side of the relationship should be marked as the 'inverse':
@OneToOne(mappedBy="profile")
private Customer customer;
public Customer getCustomer() {
return this.customer;
}
public void setCustomer(final Customer customer) {
this.customer = customer;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira