Ji Joose,
Joose Vettenranta wrote:
Hi,
I want to retrieve lot's of data and not to retrieve it's childs (1:n relationship).
I'm using like:
PersistenceManager persistenceManager = pmf.getPersistenceManager();
PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
QueryByCriteria query = QueryFactory.newQuery (beanClass, criteria, true);
Collection results = broker.getCollectionByQuery(query);
broker.close();
return results;
but what do I have to say that it does not retreive beanClasses childs?
Use collection proxy for child objects http://db.apache.org/ojb/docu/guides/basic-technique.html#Using+a+Single+Proxy+for+a+Whole+Collection
or set auto-retrieve of your collection-descriptor to "none/false". But be careful when using this setting in combination with auto-update/delete "object/true", because you have to populate all child objects before do update/delete operation in this case
http://db.apache.org/ojb/docu/guides/basic-technique.html#auto-retrieve+setting
By the way, in OJB 1.1 it will be possible to change the auto-xxx settings at runtime.
regards, Armin
Thanks,
Joose
-- "Always remember that you are unique, just like everyone else!" * http://iki.fi/joose/ * [EMAIL PROTECTED] * +358 44 561 0270 *
--------------------------------------------------------------------- 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]
