[forge-issues] [JBoss JIRA] (FORGE-393) PersistencePlugin should create Lists, not Sets, for @OneToMany
Richard Kennard (Commented) (JIRA)
jira-events at lists.jboss.org
Tue Dec 6 18:08:40 EST 2011
[ https://issues.jboss.org/browse/FORGE-393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648648#comment-12648648 ]
Richard Kennard commented on FORGE-393:
---------------------------------------
Okay we decided work around this at the JSF layer instead (see forgeview:asList in the generated scaffolding)
> PersistencePlugin should create Lists, not Sets, for @OneToMany
> ---------------------------------------------------------------
>
> Key: FORGE-393
> URL: https://issues.jboss.org/browse/FORGE-393
> Project: Forge
> Issue Type: Enhancement
> Reporter: Richard Kennard
>
> It would be cleaner for the UI if the persistence plugin could base its collections on Lists, rather than Sets. This is because JSF's built-in h:dataTable needs something with a defined ordering.
> It is possible to work around this in various ways, such as adding special getters to the view Bean, but I think for the sake of clear, concise code the easiest way would be to make the generated code be a List.
> For example:
> @OneToMany
> private List<Grocery> groceries = new ArrayList<Grocery>();
> public List<Grocery> getGroceries() {
> return this.groceries;
> }
> public void setGroceries(final List<Grocery> groceries) {
> this.groceries = groceries;
> }
--
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