Unfortunately, you didn't understand my idea
I don't care how many elements will be in Actor fields in packet.Movie
in .ActorFilter() method it is filtered element from packet.Actor in the way: an element has to have "Man" value in the "Sex" field and doesn't repeat in the next strings of packet.Movie table. And it requires to get elements from field "Actor" (packet.Movie) and compare with ID from packet.Actor
Nevermind how it will be implemented: sql or object syntax because I couldn't find information or documentation about the case
main class is packet.Movie
Class packet.Movie Extends (%Persistent, %Populate)
{
Property Title As %String (POPORDER = 0) [ Required ];
Index TitleIndex On Title [ Unique ];
Property Date As %Date (POPORDER=2) [ Required ];
Index DateIndex On Date [ Unique ];
Property Actor As list of packet.Actor (POPSPEC=".ActorFilter()") [Required];
The second class is packet.Actor:
Class packet.Actor Extends (%Persistent, %Populate)
{
Property Name As %String [ Required ];
Index NameIndex On Name [ Unique ];
Property Age As %Integer (MAXVAL=100, MINVAL=10) [ Required ];
Index AgeIndex On Age [ Unique ];
Property Sex As %String (DISPLAYLIST=",Woman,Man") [ Required ];
ActorFilter() is method to filter packet.Actor objects
Yes? my example:
Movie table:
Id Actor
1 3, 4, 5 (ID of packet.Actor objects)
2 6,7,8
packet.Actor objects have to have the "Man" value in the "Sex" field and in every object of packet.Movie there are unique value if the "Actor" field