Thanks Andrew!
That's what I need ;)

If I cauld say OJB prefetch "parent" and "children" reference in all folders wich I materizalize by this call

it would be

more productive



I am slightly confused by this statement. Are you saying you

want all

the children to be materialized when the parent is created, thus populating all of the children's back-references to it's parent with the same instance?



yes! That what I want.
In many cases proxies are well. In 99% i load only one folder, somethimes view its children or parent. So this problem in 99% doesn't bother me.
But only for one particular case I need work with the whole tree. So I want to change proxy attribute only for for this case when I want load the whole folders tree. Is it possible?






Yeah, take a look at:

http://db.apache.org/ojb/docu/guides/metadata.html#Per+thread+metadata+c
hanges

The basic concept is that you can get a copy of the
DescriptorRepository, and then get the ClassDescriptor for your 'folder'
object, and then get the CollectionDescriptor for your 'children'
collection. Then CollectionDescriptor#setLazy(false) for the duration of
your call, and then set it back.

Make sure to read about doing MetaData changes per Thread -- otherwise
your changes will affect the entire application, and not just this
particular instance (all instance of that collection will be loaded, not
just the one you care about).

Hope this helps.

-Andrew


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to