[
https://issues.jboss.org/browse/FORGE-401?page=com.atlassian.jira.plugin....
]
Lincoln Baxter III closed FORGE-401.
------------------------------------
Assignee: Lincoln Baxter III
Fix Version/s: 1.0.0.Beta4
Resolution: Done
PersistencePlugin should not initialize default value for @ManyToOne
--------------------------------------------------------------------
Key: FORGE-401
URL:
https://issues.jboss.org/browse/FORGE-401
Project: Forge
Issue Type: Bug
Reporter: Richard Kennard
Assignee: Lincoln Baxter III
Fix For: 1.0.0.Beta4
At present the PersistencePlugin generates the following default values in its entity
beans:
@OneToMany
private Set<Grocery> groceries = new HashSet<Grocery>();
@OneToOne
private Employer employer;
@ManyToOne
private Employer employer = new Employer();
The first one is non-controversial. The second one I would like to be initialized (please
please?) as it makes things much easier for the UI. But I understand if you are against
that.
But the final one I definitely think should be removed. We should just leave @ManyToOne
relationships as 'null' by default. It doesn't make sense to pre-initialize
them, even for new entities, because they are meant to point to *existing* entities.
--
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