Hi,
Robert S. Sfeir wrote:
...
That's the first thing I tried, but it returns null for my objects, I must not be using the code Right!
Project p = new ProjectBean(); //TODO: Replace with Factory call. broker.retrieveAllReferences( p ); final List results = ( List ) broker.getCollectionByQuery( query );
I don't know your ProjectBean class, but when you create a new object you can't find any reference object - or I'm wrong?
I should explain.
I am doing a select on Category. a Category bean contains a get and set for a ProjectBean. a Category only relates to one Project. If I do the autoretrieve false then the projectBean object in the Category bean is null. If I set it to true, then it correctly contains a ProjectBean which the category relates to.
Now sometimes I just want to get a list of categories, and I could care less that I get the ProjectBean with it, that's too heavy if I want to just display the category id and category name. Other times I need to do the whole thing, like for a category detail view. In that case I want to get all the ProjectBeans along with the category.
Does this makes sense?
So if I understood retrieveAllReferences, it will return all references of the object (ProjectBean) which relate to the category based on the fact that the Query object is querying Category.class.
R
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
