Re: Amber feature question

Mattias Jiderhamn <[email protected]> Fri, 02 Jun 2006 08:59:36 +0200
Newsgroups gmane.text.xml.resin.user
Message-ID <[email protected]>
Are they actually different tables (different names) or are they the 
same table, created in different namespaces/schemas/databases/catalogs?

We have about 200 tables duplicated in a couple of hundred databases 
(so far). We made this possible by subclassing the DataSource and 
switching to the correct catalog whenever a connection is fetched.

At 2006-06-01 19:23, Peter Havelaar wrote:
>Unfortunately the new tables are created dynamicly and there can be
>thousands of them.
>Generating a new class just to store in a new table does not seem like an
>efficient option.
>
>Am I wrong?
>
>Regards,
>Peter Havelaar
>
>------------------------------
>
>Date: Wed, 31 May 2006 15:32:47 -0700
>From: Scott Ferguson <[email protected]>
>Subject: Re: Amber feature question
>
>On May 30, 2006, at 2:46 AM, Peter Havelaar wrote:
>
> > Hello,
> >
> > I have just been looking into using Amber as a persistence library.
> > There is however one feature that I would like to have that has not
> > been
> > provided for in the JPA standard.
> > I would like the ability to store an Entity into a table which I
> > supply the
> > name for at the time of storing the object.
>
>I'm not sure that's possible.  Actually, I'm not sure it's possible
>to implement in any reasonably simple fashion.  The generated code
>references the table name directly.  In theory, that could be
>parameterized, but would also make the caching code complicated.
>
>Wouldn't it just be easier to have several child classes, one for
>each table?  The classes could be identical except for the @Table entry.
>
>- -- Scott