I have a small application which allows users to create accounts and then award 'points' to each other. UserAccount is an object, and so is Point, and there is an aggregation relationship between them: each UserAccount has a member variable (PointHistory) which is a collection of Points.
The Point object simply contains properties for which UserAccount object sent/received the Point.
This was fine when I simply serialized the classes to persist my object model. However, I am now implementing a database to persist the object data, and only one/some objects will be loaded into memory at any given time. To load the objects, I have a constructor method which creates a new UserAccount from a row in the database, and a similar constructor to create a Point from a database row. This is where the trouble starts - how can the constructor for one object call the constructor for another object when the second constructor must refer to what the first constructor has not yet constructed? In order to complete construction, the object must be already constructed.
The easy solution is simply to replace the collection of Point objects (PointHistory) with a collection of strings drawn from a database query. This suffices for my purposes. However, I'm wondering if there is another way to do that which doesn't abandon the Point object/object-model, and whether this aggregation/persistence problem is common?