[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2162) The entity converter(org.jboss.seam.ui.entityConverter) doesn't hanlde Sets. Its handles Lists only.

chandra mohan (JIRA) jira-events at lists.jboss.org
Fri Oct 26 08:15:01 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-2162?page=all ]

chandra mohan updated JBSEAM-2162:
----------------------------------

    Attachment: User.java

> The entity converter(org.jboss.seam.ui.entityConverter) doesn't hanlde Sets. Its handles Lists only.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-2162
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2162
>             Project: JBoss Seam
>          Issue Type: Feature Request
>          Components: Framework
>    Affects Versions: 2.0.0.BETA1
>         Environment: Windows XP Professional, eclipse Version: 3.3.0    Build id: I20070625-1500
>            Reporter: chandra mohan
>         Attachments: components.xml, User.java
>
>
> The entity converter(org.jboss.seam.ui.entityConverter) doesn't hanlde Set of entities. Its handles only Lists or Collection of entities.
> In components.xml, I had an entity query(shown below) which was generating a lot of queries. 
> <framework:entity-query scope="EVENT" name="users" ejbql="select u from User u" order="username" />
> In User class(User.java) I had a collection of entities defined as 
> protected List<Role> roles = new ArrayList<Role>(); 
> I changed the semantics from bag/collection to set, that is,
> protected Set<Role> roles = new HashSet<Role>();
> In order to reduce a number of queries, I tried to use 'left join fetch' query (shown below) which is not working in case of list or collection of entities. But it is working in case of set of entities(:-).
> 	<framework:entity-query scope="EVENT" name="usersAdmin" ejbql="SELECT DISTINCT object(u) from User u left join fetch u.groups left join fetch u.roles" order="username" />
> Now When I tried to save a record, I am getting conversion error :-(.
> I checked the entity converter sources and found that the entity converter has no problem working out the value type. In the case of a collection the entity converter must check the type of an item in the value object, rather than the value object itself. I guess that it has code to do this in the case of a list but not a set. 
> Am I thinking right? Any guidance on this issue will be very helpful if someone can throw light on this. Is there any workaround to get rid of this entity conversion problem in case of a set of entities?
> I am a newbie.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list