-->
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: plan for supporting reveng of table per subclass
PostPosted: Tue Jul 03, 2007 12:40 pm 
Newbie

Joined: Tue Jul 03, 2007 10:01 am
Posts: 2
I'm looking at adding the reverse engineering of table per subclass inheritance from the DB and I'd like some feedback on my plan.

1) If automatic feature is on, then if a table has column that is a PK and FK then consider it a subclass of the table referenced by the FK.

2) Add isSubclassDerivationKey attribute to the <foreign-key> element of reveng.xml. If present, used to override automatic setting or to set true when automatic setting is off.

3) Modify JDBCBinder.createPersistentClasses to create subclasses as appropriate using #1 and #2 above.

4) Modify EntityPOJOClass to add
generateInheritanceAnnotation()
generatePrimaryKeyJoinColumnAnnotation()

5) Modify pojo/Ejb3TypeDeclaration.ftl to take advantage of new methods in #4.

6) Not sure how hbm2hbmxml needs to be changed.

I'd like to implement this as a patch to the tools. If that is acceptable, I'll add a JIRA.

Thanks,
Martin


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.