"Denver Braughler" wrote

> Muzaffer Dogru wrote:
> > > Why do you need a relationship *class*?
> > How else would I realize a many-many relationship?
> Each person needs a collection (list, array) of Roles.
>
> > I need a third table to make the "connection" between
> > each person and his/her roles, don't I?
>
> Personally, I don't see why.
> Are you aware that object can have a property that is a collection?
> All I see is that a Person needs to have a collection of Roles.
>

hmm, I guess that's it! I have tried to implement that in cache like that:
 Property SecurityRoles As %List [ InitialExpression = {$ListBuild()} ];
This property is in the class Person and generates a method
"getSecurityRoles", which returns null and that's why a
NullPointerException... That should not be, right? I want to open a person
and add a SecurityRole by
"person.getSecurityRoles().add(SecurityRolesObject)"


> I can also see why you might want each Role to have a list
> of the Persons have have that Role, but to me that is really
> an index on Person.Role items (which I think I heard doesn't work with SQL
yet).
>
OK




Reply via email to