-->
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: Does Custom Strategy have control over columnDefinintion?
PostPosted: Mon Mar 08, 2010 2:04 pm 
Newbie

Joined: Thu Apr 02, 2009 2:44 pm
Posts: 1
I have built a DelegatingReverseEngineeringStrategy that has me 95% where I need to be
(I need to periodically reverse engineer a 500+ entitiy schema that is externally configuration managed and changes on about a 6 month cycle.)

My problem is that the Oracle 11 validator interface is a little particular about numeric datatypes. I have been able to work around these anomolies 100% of the time by adding
Code:
columnDefinition("NUMBER(11,5)")
to the
Code:
@Column
attribute, for example. I am at a loss as to where to put this in my Custom Strategy. I think the method might be columnToMetaAttribute(), but unlike ColumnToHibernateTypeName, columnToMetaAttributes does not have the precision and scale passed to it.

Is there an "approved" way to add the columnDefinition attribute? Since columnToMetaAttributes is called immediately after columnToHibernateTypeName, I can temporarily store the most recent type, percision and scale for later use in columnToMetaAttributes; though that is a little shady.

If there is not an approved way, I'll have to write an application to post-process; It would be wonderful to be able to get things done in one pass, though. Any ideas? (Honestly I did look at documentation, but I was either not finding it or the Custom Strategy docs are less-than-verbose).

Cordially,

Mark Henning

_________________
Mark Henning
6824 E Fish Lake Rd.
Maple Grove, MN 55369
mark.henning@itt.com


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.