Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ok here is another question

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any time I create a category or forum, it�s not appear in the Forum admin section but if I login as user I can se the cetegories and forum i have created but as administrator i can�t and because that i can�t erase them.

how can I fix this problem??


[originally posted on jforum.net by jarkaos]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course this further caused problems because the id's are not unique in the query either. Resolved by concatenating the role_id and the role_value into a unique role identifier.

SELECT r.role_id || role_value as role_id
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry. there are a number of other areas that need to be updated to accommodate this change. You'll either need to work through them all, or find another approach, but it is my feeling that the 'there can be only one' implementation of the hashmap is the cause of a number of the bugs in this and the bugs topic.l
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
apologies for all the nonsense. It was only that in the oracle.sql file the order by clause was missing for load roles by user/group
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This bug is fixed in the development version.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic