-->
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.  [ 2 posts ] 
Author Message
 Post subject: Min requirements for custom many-to-many reveng inference?
PostPosted: Wed Dec 29, 2010 6:51 pm 
Newbie

Joined: Wed Dec 29, 2010 6:36 pm
Posts: 5
Hi. I've implemented a custom strategy coming off of DelegatingReverseEngineeringStrategy that overrides isManyToManyTable(Table table) and successfully manages for my usecase. However, I'm unsure what else I need to do for reveng to successfully create the m2m mapping.

My progress is as follows:
1) code custom strategy to match usecase
2) tests on isManyToManyTable() are successful
3) hibernate reverse engineering completes but ignores the m2m mapping
4) tweak things so that the primary key is back to being a coupling of 2 fk columns but rest of usecase is preserved
5) hibernate reverse engineering completes and m2m mapping is included!

The issue is that I don't want to require that the primary key is a coupling of the fk columns. (I want to infer that the table is a m2m facilitator based on table.name.) Are there perhaps some other methods on the custom strategy that I need to override to return pointers to the fk columns that the m2m is joining?

Thanks.

SF


Top
 Profile  
 
 Post subject: Re: Min requirements for custom many-to-many reveng inference?
PostPosted: Wed Dec 29, 2010 7:44 pm 
Newbie

Joined: Wed Dec 29, 2010 6:36 pm
Posts: 5
Nevermind. Seems to be working properly now.

While revisiting it, I noticed that there's a difference btwn when you perform reveng across the associated entities vs when you do so on only a single one. While doing it across entities, reveng has the visibility to do the full necessary analysis.

Thanks. Nice work on this tool.


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

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.