Christoph, If you are NOT using the Manager option, then there may be multiple objects for Book A. In particular (as you described), loading a Book, asking it to load its author, then asking the author to load her books will lead to two objects both of which represent the same "book" in the database (ie, the same row.)
Documentation is best found by looking at the generated source code - it's pretty simple stuff. My understanding (although I haven't used them) is that the managers are designed to get around some of these issues and cache the objects they bring back - thus getting the behavior you want. Maybe someone else has used managers? -Peter On Tue, 2002-10-29 at 12:44, Christoph Priebe wrote: > Hello, > > I have a small problem wich looks like this: > > I defined a table/class Book and a related one called Author. > I build a user interface component wich is a listener > (observer-observable-pattern) to Book. Book holds a HashSet of > listeners (initialized in the constructor of Book). If eg. the > title of the Book changes an event is fired and propagated to > the user interface. So much for the theory. > > Now I do this: > 1. I ask the BookPeer for a list of all Books. I get, say: > 'Book A', 'Book B' and 'Book C' > 2. I ask an Author for his Book. I get eg. 'Book A' > > Now I expect 'Book A' - wether got from the Peer or the Author - > to be the same object. BUT it looks like the constructor of > 'Book A' is called two times. With the result that all listeners > registered with 'Book A' are "purged". > > Hence, my questions: > - Is there exactly one object instance for one database entry? > - Where do I find some documentation about object instanciation > in Torque? > - What else may be the problem? > - Or, am I just not smart enough for all this? > > Thanx in advance. > Christoph > > -- > ----------------------------------------------------------------------- > Christoph Priebe > [EMAIL PROTECTED] > > > -- > To unsubscribe, e-mail: <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org> > -- To unsubscribe, e-mail: <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>
