module Schemaker
The subject model:
-
is the model which is the subject of the behavior added.
-
it has the main field, which CAN be a relationship to the object model, either directly or via a join model (fx in Relational DBs)
The object model:
-
is the object of interest to the subject, fx a Role model is the object of interest for a UserAccount (subject)
-
the object can be referenced directly, via a join model or embedded under the subject
The join model:
-
is used to bind object to subject in a Many-to-Many relationship, typically for Relational DBs
-
it must have a foreign key for both object and subject model, and most often no primary key of its own
@author Kristian Mandrup
Basic Model configuration functionality
Each type of model to be configured shares some common functionality and state, that is encapsulated here for reuse
@author Kristian Mandrup
Model configuration of the Join model (fx UsersRoles)
Knows how to configure the Join model between a subject model (the main target of the behavior fx UserAccount) and the object model (the behavior to be added, fx Role)
@author Kristian Mandrup
Model configuration of the Object model (fx Role)
Knows how to configure the relationship fro the Object model to the subject model via the Join model
@author Kristian Mandrup
Model configuration of the Subject model (fx Role)
Knows how to configure the relationship fro the Object model to the subject model via the Join model