posted 19 years ago
I'm not sure it's the same issue, but I ran into this with categories. I found that since the RoleCollection extends from LinkedHashMap and uses role.name as the key, you will only ever get ONE of the categories defined, rather than the entire set that seems to come back when you run the query directly. I corrected this by changing the add implementation to use role.id for the map key instead.
public void add(Role role)
{
super.put(new Integer(role.getId()), role);
}
Hope this helps.
[originally posted on jforum.net by Anonymous]