Quick search:


What is a relationship

A relationship defines that peanuts of a type can reference other peanuts
Relationships are implicit, but their navigation is descibed through derived properties whose type is the class of the related peanuts. If so the relationship can be navigated by retrieving the property value. There may also be a property that offers navigation of the relationship in the opposite direction. If so the navigation is bi-directional.

PntDerivedPropertyDescriptor implements default behavior for navigating relationships. It looks for a property with the same name, extended with 'Id'. Then it lets the classDescriptor of its type retrieve a peanut with the value of that property as its id. If this is a PntDbClassDescriptor this will retrieve the peanut from the database, or maybe from the cache.

PntDerivedPropertyDescriptor also implements default behavior for setting a related peanut as a property value: it will get the id from the related peanut and set that as the value of the id-property described above.

Multi value properties may offer navigation in the opposite direction, and since version 1.2, over n to m relationships.

Property getters and setters may override all this.