Arun Sudhakaran wrote:
Since we are having the problem because castor is loading the no-dependent related objects. is there some way we can block those objects from being loaded? if so how can we go about doing it and what are its implications ,like would it cause any undesirable side effects ,will there be any performance issues etc.

Castor is designed to hide the persistence layer details, thus if you
have a graph of objects in database, it will load *all* the graph into
memory when you access one of the objects.

The lazy loading feature tries to avoid loading to much data, but it
is limited to collection relations.

You have a one to many relation and do not want to load all the objects
on the many side when loading an instance => you cannot tell Castor that
it is a one to many relation.

This is the same as having a User-Group relation, if you have say 100000
users, you don't want to load all of them.

=>
User is linked to Group
Group is not linked to User

You can then add a finder method on Group if you want to get its Users :
ArrayList findUserByName(String pattern).
This method will use an OQL query to load Users.

Hope this can help...

--
Mickael Guessant

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev



Reply via email to