-->
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: O-R mapping with middlegen
PostPosted: Fri Jun 17, 2005 5:00 am 
Newbie

Joined: Fri Jun 17, 2005 4:46 am
Posts: 2
Hi,

I am using

[a]Hibernate version: 4.0

[b]Name and version of the database you are using: db2 on os400 v5r2

We have designed a database scheme as well as a proper Java object model. We are also using middlegen to generate the mapping files and a layer of value objects which are a naked wrapper around the db. Now the issue is how do we go about mapping db to our java model. Should we generate the mapping file and modify it arrive at the desired class structure. OR do we let the VO layer remain as it and call them from our Java model by keeping these as references. The benefit of the second approach seems to be that at the time of regeneration there is minimum impact on generated xml and vo files. But it does result in an extra layer of objects. Is there any other approach we shoudl take? Please suggest. We do not have time to handcode the xml for our object model given the timeline for our project.

Satyan


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 18, 2005 12:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Hibernate version 4.0? Have not seen that version as yet :-) .

Not sure what to say other than choose which ever you think will work the best for you. I would suspect the wrapper layer might save you some initial up front work. You could choose to modify the XMLs to map to your domain model. The XML format is easy to keep up to date once you have them all. The next step (from a longer term vision) would be to add annotations to the domain model.


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.