-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: multiple mapping files for same class
PostPosted: Tue Jul 20, 2004 5:09 pm 
Newbie

Joined: Mon Jul 12, 2004 7:31 pm
Posts: 3
I am using hibernate 2.1 with xdoclet 1.2.1

For each class I have written some hibernate tags that are used by xdoclet to create the mapping documents for hibernate.

I was wondering if anyone is aware of a way to generate 2 mapping files for the same class.

I.e. I want to read and write Class Foo into Table A & also be able to read and write Class Foo into Table B. In addition I want to be able to read the Class Foo from Table A and transform it in some way and write into table B.

I am currently thinking that the best way to do this would be to extend the hibernate xdoclet to recognize @hibernate2 tags - which will be exactly the same as the @hibernate tags except that I will generate a 2nd/different mapping file for this class by looking at the hibernate2 tags.

So At run time I will have 2 session factories - one that uses the mapping files generated by the standard hibernate xdoclet and the 2nd session factory would be the one that uses the mapping files generated by the hibernate2 tags.

The reason for this is that the Rows in Table A are moved into Rows in Table B with some minor transformations during the "RELEASE" process. So essentially the object before release is in Table A & after release is in Table B.

Thanks
Pratima


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.