Suppose I have an app that deals with people employment and reading habits. The app has ``core’’ sub-model with Person class, ``employment’’ sub-model with Employer class and ``reading’’ sub-model with Library class. There is one-to-many association between Employer and Person and many-to-many association between Library and Person. In order to express Person-Employer (or Person-Library) association, especially with bidirectional navigation and cascade-xxx behaviour, Person class must have persistent attribute of type Employer which basically means circular dependency between core and employment sub-models.
This circular dependency becomes a problem for bigger persistent models where it is desired to develop (compile, version, etc) sub-models separately. Using subset of the model (i.e. reading sub-model, but not employment) also seems to be a problem due to the monolith code structure.
So I guess my question is two-folded. First, does it all make sense? And if it does, what do people do to partition bigger persistent models?
_________________ Regards,
Igor
|