Display class, we used the information about the type of relation stored by the
MetaRelation metaclass. This is necessary because in recognizing that there is more than one type of relation, we need some way to indicate that when we define a new relation and act upon that information when creating a new class. Look at the following example code:
class A(Entity): pass class B(Entity): pass class AhasmanyB(Relation): a=A b=B
Here we express the relation between
B to be one-to-many. If we would like to express the notion that an instance of
A may refer only to a single
B instance, we need some way to indicate that in the definition. One way of doing so is by reversing the assignments in the class ...