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.  [ 4 posts ] 
Author Message
 Post subject: Multi-Column Exclude in reveng.xml
PostPosted: Fri Jun 02, 2006 3:52 pm 
Newbie

Joined: Fri Jun 02, 2006 3:19 pm
Posts: 1
I'm looking to exclude as many columns out of the reveng as possible. Why? I [b]really[/b] like the reveng capabilities of Hibernate tools, but it does create a very tight coupling to the database I'm using (a db which has a lot of data / columns that I'm not interested in). I'm afraid that over time, new columns (that I'm not using) will be added and changed to the tables in the db, and at some point my app will break due to the tight coupling I get from reveng.xml.

Thus, I'd like to have this construct:
<table name="X">
<column name="INTERESTING" exclude="false" />
<column name=".*" exclude="true" />
</table>

This way, if someone adds a column, then at some later point changes or deletes it (and somewhere in the middle of this I'd reveng'd off an intermediate schema), my app would remain unaffected by any such changes.

BTW, this is what I'm doing today:
<table name="X">
<column name="INTERESTING" exclude="false" />
<column name="NOT" exclude="true" />
<column name="VERY" exclude="true" />
<column name="RELAVENT" exclude="true" />
</table>

If there's a way I can bulk exclude columns (ala column name=".*"), let me know. Otherwise, please consider this as a future enhancement.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 02, 2006 4:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm....it would be possible via custom revengstrategy impl if excludeColumn returned a Boolean instead of a boolan.

then you could just return true for those columns/tables the delegate doesn't know.

put it in jira with a ref to this forum posting and i'll consider what we can do.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Multi-Column Exclude in reveng.xml
PostPosted: Mon Mar 17, 2008 5:57 am 
Newbie

Joined: Thu Mar 13, 2008 10:12 am
Posts: 1
Hi, do you have more information about

<column name=".*" exclude="true" />

I try to use this syntax, but Hibernate generates code for all the table columns.



fpurcell wrote:
I'm looking to exclude as many columns out of the reveng as possible. Why? I really like the reveng capabilities of Hibernate tools, but it does create a very tight coupling to the database I'm using (a db which has a lot of data / columns that I'm not interested in). I'm afraid that over time, new columns (that I'm not using) will be added and changed to the tables in the db, and at some point my app will break due to the tight coupling I get from reveng.xml.

Thus, I'd like to have this construct:
<table name="X">
<column name="INTERESTING" exclude="false" />
<column name=".*" exclude="true" />
</table>

This way, if someone adds a column, then at some later point changes or deletes it (and somewhere in the middle of this I'd reveng'd off an intermediate schema), my app would remain unaffected by any such changes.

BTW, this is what I'm doing today:
<table name="X">
<column name="INTERESTING" exclude="false" />
<column name="NOT" exclude="true" />
<column name="VERY" exclude="true" />
<column name="RELAVENT" exclude="true" />
</table>

If there's a way I can bulk exclude columns (ala column name=".*"), let me know. Otherwise, please consider this as a future enhancement.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 17, 2008 12:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
column=".*" is a suggested improvement - i don't recall any jira/patches about it yet.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.