SORRY!
Wrong maillist. Copied the wrong address.
Dennis Riedel wrote:
Hello
I am new to OJB and asking myself, how to query multiple tables using
the persistenceBroker.
I cannot follow the example given on the OJB Query Page, I don`t
understand it.
I have three tables and all contain one column 'area_id'. I want to
find all entries in all tables containing a specific area_id, e.g. '2'.
So I think joining them would be the idea.
When I expect one resulting object of that query (there can be only
one result, that is a fact), of which type will this be?
I workd with DAO Classes to recieve a special object or a collection
of special objects.
But how is it, when I query on three tables, representing three
different objects? Do I need a wrapper? Should these three objects
implement the same interface to 'encapsulate' or 'wrap' the resulting
object?
With my actual knowledge I would query each table with its DAO but
that would be three queries to get the result.
I want one query.
Thanks for any support on querying multiple tables.