Re: Mapping class to multiple tables with entity-name (hibernate plugin)

Konstantin Priblouda <kpriblouda-/[email protected]> Mon, 19 Mar 2007 00:49:58 -0700 (PDT)
Newsgroups gmane.comp.java.xdoclet-plugins
Message-ID <[email protected]>
--- Marcin Zaj±czkowski <[email protected]> wrote:

> Hi,
> 
> 
> In my program I use entity-name to map one class to
> two tables (normal
> and archived items). In my previous project I was
> writing hbms by hand
> and was able to do:
> 
> <hibernate-mapping>
>    <class table="CLASS" name="some.my.Class">
> (...)
>    </class>
> 
>      <class entity-name="archived"
> table="ARCHIVED_CLASS"
> name="some.my.Class">
> (...)
>      </class>
> </hibernate-mapping>
> 
> 
> When I use xdoclet
> (xdoclet-plugin-hibernate-1.0.4-20060701.151747) to
> generate hbms it recognizes entity-name correctly (I
> see it in
> one-to-many association), but it ignores two
> @hibernate.class tags (for
> one class).
> 
> I tried with combination:
> @hibernate.class table = "CLASS"
> @hibernate.class table = "ARCHIVED_CLASS"
> entity-name = "archived"
> 
> and only first is used in generation.
> 
> 
> Is there class mapping to multiple tables supported
> in hibernate plugin?

Current plugin version generates one mapping per class
only

regards,


----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV