On page 174 roles probelm
On page 174 this code seems strange and might be causing my contraint problems
//add
ID = newENTRoleData().Insert(db, RoleName, userAccountId);
//since this was an add you need to update the role ids for the user and capability records
foreach (ENTRoleCapabilityEO capability in RoleCapabilities)
{
capability.ENTRoleId = ID;
}
foreach (ENTRoleUserAccountEO user in RoleUserAccounts)
{
user.ENTRoleId = ID;
}
The Capability.ENTRoleId should be I Think Capability.ENTCapabilityId and needs another ID to use instead of he one returned by newENTRoleData().Insert(db, RoleName, userAccountId);
|