Hi Jesse,

----- Original Message -----
From: "Jesse Vitrone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 16, 2003 3:34 PM
Subject: mapping class to multiple tables?


> Sorry, I'm sure this is the docs somewhere, but I just can't seem to
> find it.
>
> The features list shows this feature:
>     Classes can be mapped to an arbitrary number of JDBC datasources.

this is possible (use of multiple databases), but your question is to
map a class to multiple tables (of the same database?).
I'm not sure, think currently this is only possible by
delegate the calls from the main class to subsequent classes
using 1:1 references.
see
http://db.apache.org/ojb/tutorial3.html#mapping classes on multiple
joined tables

class Main
{
    private Sub1 sub1;
    private Sub2 sub2;

    public String getName()
    {
        return sub1.getName()
    }
    .....
}

If you want to map a class to multiple tables of different
databases you always have to handle this by your own,
because there are many pitfals: need of distributed tx, querying, ....

regards,
Armin

>
> Where in the docs does it show how to do this?  I read through the
> advanced O/R tutorial, and I don't see it.  Did I just miss it?
>
> I'm just getting started with OJB, but it looks great so far!
>
> Thanks in advance,
>     Jesse
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to