Hello Everyone

I searched through the mailing list and was surprised not to find
suitable informations about queries on dependent classes (so if there is
already a thread with a solution for this... please send me the link).

Certainly I read in the documentation that I cannot make a direct query
on a dependent class. So I tried a query like this one:

Scenario:

public Club { Vector m_Groups = new Vector(); (...) }
public Group { Club m_Club = null; (...) }

There are some Clubs and a Club can have some Groups (but a Group can
only have one Club) - therefore the Group.class depends on Club.class.

Query:

SELECT g FROM c in Club, g in c.m_Groups (...)

This would follow the official ODMG standard for OQL. But I also read
that Castor doesn't support anything else than 'real' classes in the
FROM-clause. 

So my question is: How can I make a query, where I only receive a
collection of the depending class? If I'm not interested in the clubs,
but only want to have an overview over the groups (under certain
criteria), I don't want to receive a collection with the clubs and then
look for the wished groups myself...

Another solution would be, to make the groups independent of the clubs.
But then I suffer from NoSuchElementException (maybe my mapping has some
mistakes...) while going through the QueryResult. I will try to follow
this solution as long as I don't get any helpful advices.

Stefan Frank

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

Reply via email to