[forge-issues] [JBoss JIRA] (FORGE-397) PersistencePlugin does not mark one side of a OneToOne as 'mappedBy'

Richard Kennard (Created) (JIRA) jira-events at lists.jboss.org
Thu Dec 1 17:09:40 EST 2011


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


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

        


More information about the forge-issues mailing list