01 العلاقات المتقدمة
تصميم العلاقات بين الكائنات بشكل صحيح.
Class MyApp.Department Extends %Persistent {
Property Name As %String;
Relationship Employees As MyApp.Employee [ Cardinality = children, Inverse = Department ];
}
Class MyApp.Employee Extends %Persistent {
Property Name As %String;
Relationship Department As MyApp.Department [ Cardinality = one, Inverse = Employees ];
Index DeptIdx On Department;
}