I'm having a hard time understanding a particular concept in the relation of objects in a CSLA environment. I believe it is probably a simple concept, but one I am just not grasping (I have been working in data normalization-based system for a long time, and the behavior-normalization concept is fairly new, but sensible to me).
This is the way my project is setup:
I have three root objects:
1) Participant - Represents domestic information for a single person; Such as Name, Birth Date, Address, Etc.
2) Group - Represents a "Client" (id, name, effective date, banking information)
3) Account - Represents a "family" of participants that are members of A "Group".
Within the account object, I have a list of "Enrollee" objects, which represent the association of a Participant to an Account. Also, within the account, I need a way to reference the Group that the account is associated with.
This is my question:
I am not sure how to setup the association of an account to a group. I thought, initially, that I should have a literal reference to the Group object, but I ran into some issues with fetching my account object and not being able to load my group object unless I wanted to "fully" load my group object. So, then I thought that "behavior" tells me I need a seperate object (perhaps) called "AccountGroup" that represents only the minimal information I need from the group for the account. That worked out OK, with the exception that I now run into a problem with binding to controls on the form. If I have a screen that shows a combo-box of all my Group objects in the system, how do I databind the selection of the control to my account object when the account object has an "AccountGroup" property, instead of a "Group" property.
Perhaps I am missing something far more fundamental... I am not sure. Any help understanding what the "correct" thing to do is would be greatly appreciated.
Thanks!
Copyright (c) Marimer LLC