Call to associateGroups(head, branch) does not persist the group relationship
-----------------------------------------------------------------------------

                 Key: SEAM-89
                 URL: https://issues.jboss.org/browse/SEAM-89
             Project: Seam 3 Distribution
          Issue Type: Bug
    Affects Versions: 3.0.0.Final
         Environment: Windows 7 x64, MySQL 5.1
            Reporter: Bill Elliot


This is using MySQL 5.1 and it appears the association is not being persisted. 
If I manually enter the table row the association is detected correctly. But, 
the call to associateGroups is not persisting the relationship. I have used the 
following code to test out this: 

package org.jboss.seam.security.examples.idmconsole.tests;

import javax.inject.Inject;

import org.picketlink.idm.api.Group;
import org.picketlink.idm.api.IdentitySession;
import org.picketlink.idm.api.PersistenceManager;
import org.picketlink.idm.api.RelationshipManager;
import org.picketlink.idm.common.exception.IdentityException;

public class TestSecurity {

        @Inject IdentitySession identitySession;
         
        public String testAction() throws IdentityException {
                PersistenceManager pm = identitySession.getPersistenceManager();
                RelationshipManager rm = 
identitySession.getRelationshipManager();
                Group head = pm.findGroup("Head Office", "ORGANIZATION_UNIT");
                Group branch = pm.findGroup("Branch Office", 
"ORGANIZATION_UNIT");
                if( ! rm.isAssociated(head, branch) ) {
                        rm.associateGroups(head, branch);
                }
                boolean isAssociated = rm.isAssociated(head, branch);
                return null;
        }
}

The 2 groups in the test code exist in my test DB when I run the above code. I 
single step through the code to verify the situation after each line and 
everything is as expected, except that the call to rm.associateGroups(head, 
branch); does not persist the association.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to