-->
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: OR Mapping Question
PostPosted: Tue Jun 19, 2007 7:01 pm 
Newbie

Joined: Tue Jun 19, 2007 6:50 pm
Posts: 2
Hi,

I'm kind of new to Hibernate and we've decided to migrate our current application by using Hibernate as the persistence layer. This will involve the changes of both entity classes and database schema. In order to make the transition smooth, I'd like to do it in two steps:

1. Define entity classes using annotions.
2. Change the underlying database schema accordingly.

Here is my question:

I know that the entity classes are mapped to the database tables automatically by Hibernate or whatever persistence provider, is there a way for me to manually map entity to my own database schema, which in our case is our current database schema? This will allow us to redefine all entity classes first, verify to see if it works with the current database schema, and then change the database schema to the new one.

Any help is highly appreciated.

Thanks,
Weijun


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 20, 2007 3:12 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

You can do manual binding to a table using .hbm.xml files (Mapping files). i'm not familiar with annotation . but i know that it is same as using a seperate mapping file for entity.


Amila

(Don't forget to rate if helps)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 2:46 am 
Newbie

Joined: Tue Jun 19, 2007 6:50 pm
Posts: 2
Thanks Amila for your help. BTW, I'm new to this forum and how can I rate your reply?

Best Regards,
Weijun


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 21, 2007 3:12 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

under my post you can rank it


Amila


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.