Class: RelationDescriptor

RelationDescriptor

Describes a relation in BookshelfMapping


new RelationDescriptor()

Properties:
Name Type Description
name string

Name of the Relation.

references ReferenceDescriptor

Describes Referenced Entity or ValueObject

type string

Multiplicity. Getters and Setters area created in Entity. Values are:
"hasOne" (FK is in this entity)
"belongsTo" (FK is in referenced entity)
"hasMany" (1:n or m:n relation). No setter, but modifier methods in Entity ("add" / "remove" + relation.name)

Source: