Re: Amber feature question
"Peter Havelaar" <[email protected]> Thu, 1 Jun 2006 19:23:10 +0200
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <006d01c685a0$0e7e7d30$671ba8c0@Laptop> |
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