2

I'have builded a custom relationship to allow Account to open a Module. So i copied org.picketlink.idm.model.basic.Grant and renamed it. The relationship is created successfully, the database tables are created, but when the relationship is stored on the DB, the records are duplicated: Here an example

For the same record there are 2 assignee and 2 module, so if i try to remove the module for instance, i get an exception.

I've read the official guide but it use an annotation:

org.picketlink.idm.model.annotation.RelationshipIdentity

that not exists!

Anyone has experienced the same duplication error or tryed to build custom relationship?

Daniele Licitra
  • 1,520
  • 21
  • 45

1 Answers1

1

Solved.

The problem was in the entities for persisting the records on Database. I have the classes RelationshipTypeEntity and RelationshipIdentityTypeEntity like suggested in the official guide. Theese entity classes are sufficient! I added also ModuleUserRelationship that expands RelationshipTypeEntity, but in this way in the table i found a reference for the RelationshipTypeEntity table and another for the ModuleUser table.

So removing additional entity classes resolved my problem.

Daniele Licitra
  • 1,520
  • 21
  • 45