Re: Amber feature question
Scott Ferguson <[email protected]> Wed, 31 May 2006 15:32:47 -0700
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <[email protected]> |
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 > In other words I want to be able to dynamicly determine the table > an Entity > has to be stored in. > The reason I need this is to be able to split giant table up into > seperate > domains. The different domains have no shared data and can > therefore safely > be split into multiple tables, no queries are performed that span > multiples > of these tables. > > Is there allready a way to simply do this? If not, how do I create > this? > > With regards, > Peter Havelaar > >