Skip to main content

Relationship Properties

Relationship Properties

This section describes how the Populate() method, by default, generates data for properties of the following form:

Relationship PropertyName as PersistentObject;

Where PersistentObject is a class that inherits from %PersistentOpens in a new tab.

For such properties:

  • If the referenced class inherits from %PopulateOpens in a new tab:

    • If the cardinality of the relationship is one or parent, then the Populate() method performs a random sample of the extent of the referenced class and then randomly selects one value from that sample.

      Note that this means you must generate data for the referenced class first. Or create data for the class in any other way.

    • If the cardinality of the relationship is many or children, then the Populate() method ignores this property because the values for this property are not stored in the extent for this class.

  • If the referenced class does not inherit from %PopulateOpens in a new tab, the Populate() method does not generate any values for the property.

FeedbackOpens in a new tab