If I have a Tree that has Apples, how should I model the fact that the Apples are had by Tree. Consider that there would be 3 database tables: tree, apple, tree_apples.
It seems to me that there would be a AppleDecorator class so that Tree can have multiple AppleDecorators and call ->save() for each one which would write the association to tree_apples. Apple does not know that it is owned by Tree.
It seems wrong to make references to the tree_apples table from the Tree class other than getting the ids of all trees because then the Tree class is referencing one table for each type of object that it has (and needs to store the fact that it has one). Even getting the Ids could be offloaded into something like an Iterator.
How should the situation where an application needs to store the fact that an object owns N other objects? (In this case my class needs to store associations for 5 other types of objects).
Put the apples in a list or a set on the tree.
If you are using an O/R mapper, there will be a way to annotate or indicate that the list is a one-to-many to apples using the tree_appes table as a join table. The join can be saved using a cascading save of the list of apples (in the tree).