-->
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: HBM from PowerDesigner (mismatch Pojo and SQL naming)
PostPosted: Fri May 13, 2005 2:38 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Hi,

I am trying to automate the creation of my Pojo and XML HBM file using a Sybase PowerDesigner model. My power deisgner model is a "data model" not an OO model, so I cannot export it to XMI...


I plan to build a persistent layer over a legacy database. The naming of all table and column will be different of the actual "data model". I mean that the "Domain Model" (Java Pojo naming) will be different of the "Physical Data Model" (database naming convention).

Per exemple, the Account table will be name ACT65 in the database will column using the same naming convention (ACY55, ACU87, ACI99, etc). I want my Pojo to be name "Account" with columns named "accountID, profile, type, etc..."

I have check this link about this question:
http://www.hibernate.org/hib_docs/online/workshop_toolset/presentation/html/img6.html

But I still have some question here.

This scenario shown above seems to build an XML Schema and Pojo with the same name as in the database.

Is there a way to build a Pojo with different naming that in the database? First I was thinking to fill some kind of "alternate name" in the Sybase database and reach it my the "Artefact Exporter" from Hibernate Tools, but it seems that this kind of altername is not present.

Then I thaught about converting the PowerDesigner PDM file (it is a xml based file) to the HBM file... using XSLT... This could be quite hard and there is plenty of reverse tool for hibernate... I dont want to write one for myself.

So anyone had this kind of problem?

Thanks

Etienne


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 4:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you will be able to specify overrides in the rev.eng. tool of hibernate tools.

if you have any input on how you would like to specify this then these are very welcome since i reckon you need to actually "override" all the columns in someway.

right now we have xml format in mind `plus you can write your own ReverseNamingStrategy.

-max

_________________
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.  [ 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.