1 Reply Latest reply on Feb 11, 2016 10:14 AM by f10

    Duplicated database values with custom identy model

    arthurgregorio

      I'm using a custom identity model based on this post: http://picketlink.org/gettingstarted/custom_idm_model/, but when i start the project and initialize the security system, the relationships are duplicated in the database:

      erro.PNG

      I started the system by creating just one role and linking it to a group, then I linked a user in this group and then the records in the database appear to be duplicates ... Notice that the ID's are the same

       

      Configuration: web-budget/SecurityConfiguration.java at experimental · arthurgregorio/web-budget · GitHub

      Intialization: web-budget/SecurityInitializer.java at experimental · arthurgregorio/web-budget · GitHub

       

      The securtiy model classes: web-budget/webBudget/src/main/java/br/com/webbudget/domain/security at experimental · arthurgregorio/web-budget · GitHub

      The security model entities: web-budget/webBudget/src/main/java/br/com/webbudget/domain/entity/security at experimental · arthurgregorio/web-budget ·…

       

      The relationships table (seems ok to me)

      relations.PNG

      any idea why this happens?

        • 1. Re: Duplicated database values with custom identy model
          f10

          Hi,

           

          this post is rather old, but I was curious and I must say I have the same issue.

          When starting with an empty db and calling my SecurityInitializer createing groups, roles, groupmemberships, etc. I see duplicates as decribed above.


          I'm also able to add a User to the same Group multiple times? Is this intended behavior on picketlink's side? Do I have to restrict that on the entity level with constraints?


          Any ideas?