Question
· Oct 1, 2019

NoExtent and object references

Hello,

lets have two  abstract %Persistent classes A,B with NoExtent keyword (storing data in separate globals for each subclass).

Class A Extends %Persistent [Abstract, NoExtent]

{

}

Class B Extends %Persistent [Abstract, NoExtent]

{

     Property Aref As A;

}

Let B class reference the A class. Since the A class has no extent the reference wont work in subclasses. It wont be even usable in SQL.  Is it possible to solve this problem? Whats the recommended way to deal with references/relationships using NoExtent?

Discussion (6)1
Log in or sign up to continue

If you want to allow subclasses of class A with a property that references Abstract %Persistent Class B, and allow A objects to use that property to reference any of the subclasses of B, class B must have its own extent (all subclass data stored in the same global). Otherwise, since the A objects only store the ID of the referenced B objects, how would the system determine which subclass of B ID #52 refers to? When all the subclass data is stored in the same global, IDs are unique across all subclasses, and ID #52 refers to one object only.

Adding a BitMap extent index to class B helps compensate for the fact that all B objects are stored together, and improves the performance of queries on the subclasses.