Martin Kal�n wrote:
Maksimenko Alexander wrote:
I have tree like structure (with parent,children relationships). I'm using proxies to lazy materialize them. Everything works well but in particular cases I have to materialize the whole tree because folder.getChildren().get(0).getParent() is not the same as folder and sometimes it makes the problem. How can I tell OJB to prefetch references "parent" and "children" for all folders? Or is there simpler way to do this?
I am not sure I understand your question correctly, but it sounds like
you (possibly among other things) are interested in getting a deterministic
order on your Collection references?
If that is the case, have a look at the orderby and sort attributes of collection-descriptor [1].
Sory a was not clear enough :(
No I mean that due lazy initialization folder and folder.getChildren().get(0).getParent() are equals (by id) but not the same objects. Lets we have
Folder folder = ...//get from ojb
Folder child = folder.getChildren().get(0);
folder.changeName("new-name") // but child.getParent().getName() doesn't equal "new-name"
its okey in the most cases but in only one case I need prevent this. I think this problem will disapear if I can tell ojb don't use proxies for particular getting objects from database. but I don't know how I can do this
Hope I was clear now ;)
Thanks
Alexander
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
