Mapping class to multiple tables with entity-name (hibernate plugin)
Marcin ZajÄ…czkowski <[email protected]> Mon, 19 Mar 2007 08:40:16 +0100
| Newsgroups | gmane.comp.java.xdoclet-plugins |
|---|---|
| Message-ID | <[email protected]> |
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?
Thanks for your answer
Marcin
-------------------------------------------------------------------------
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