db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.fhg.de>
Subject Re: OQL grammar changes
Date Thu, 01 Jul 2004 17:26:12 GMT
Clóvis Wichoski wrote:
> The only working is if qtyFromClass == 1 (only one class in from clause) 
> the else is for multiple classes and this TODO is because I don't know 
> (for while) how OJB query selects or if it support multiple classes, I 
> just started using OJB one week ago, I'm attempt to migrate from a 
> production Castor application with minor changes on current source code, 
> then one of requisites is that from classes as an alias, and supports 
> uppercases on keywords, then the multiple classes come in like a bonus 
> startup, when we had time this can be done or maybe not, I put the TODO 
> to cause a thoughts about that.

There are two somewhat different areas where queries are used in OJB: 
for object retrieval, and for reporting. With the former you retrieve 
persistent objects (i.e. instances of classes that have a class 
descriptor) that match some criteria. The latter is to gather 
information from the database, but the information is not required to be 
a persistent object.
For object retrieval IMO it would only make sense to have multiple 
classes in the from clause when trying to limit the classes that are 
searched in. E.g. if you have classes A, B, C, D with B, C, and D 
extending from the abstract base class A, then a "select * from B, D" 
would retrieve only instances from B and D and the where clause could 
only specify features of the common basetype A.
For report queries, the specification of multiple classes looks a lot 
like a inner join specification but I don't know whether that is feasable.

Could you perhaps provide some samples where you use multiple classes in 
order to illustrate the concepts ?


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message