Peter Cooper wrote: > Denver said: >> "I suggest making PersonRole abstract since it appears that a query is >> unlikely to span Roles." > possible but there is always (probably even if it's only system > maintenance) to see all the roles for a give person - so you would > need a span query
Assuming that Person contains a collection of Roles with a pointer to the applicable PersonRole subclass object ID, why? In others words, the solution is for a Person to have pointers to all his Roles. [An alternative is for system maintenance to locate every PersonRole subclass and search it for the Person.] Making PersonRole abstract means that the persistent Employee subclass data and the persistent Patient subclass data are stored separately and are unlikely to be accidentally queried since typically Role must be specified in order to find any data.
