-->
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.  [ 6 posts ] 
Author Message
 Post subject: What are the issues I should consider with Hibernate?
PostPosted: Wed Oct 11, 2006 11:24 am 
Newbie

Joined: Tue Aug 08, 2006 4:01 am
Posts: 8
Hello,

I am developing a system using Hibernate, JSF and Spring. I'd like to know what are the biggest issues that I should consider since I don't have so much experience with Hibernate. The system doesn't have requirements for a lot of users try to access the same resource concurrently, for example, but it's a legacy database.

Is there any situation where I need to use iBatis or is Hibernate 3.1+ enough?

Technical explanations inside the Hibernate is very very welcome.

Thanks in advance. Nato.
p.s. Just to let you know that I'm already working hard on it(Hibernate, JSF and Spring).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 11, 2006 1:14 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
ehh, not many issues. Only thing I do is if I have really complex and long queries, is that I just do a sql call instead of trying to convert them to criteria or hql.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 2:19 am 
Newbie

Joined: Tue Aug 08, 2006 4:01 am
Posts: 8
Chris,

Thanks for your reply. What about the issues related with legacy database?

Regards, Nato.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 9:44 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
Hibernate can handle legacy databases. The only problem I ever find with those is the heavy use of natural keys; but hibernate doesn't have any problems using multiple keys to match relationships. Only tricky thing is if you use sets you have to define the hashCode to use some other fields than the keys as they can often be the same

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 10:42 am 
Newbie

Joined: Tue Aug 08, 2006 4:01 am
Posts: 8
Interesting about the set's trick. So, I have to define hashCode() - like you said - and equals() as well.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 12, 2006 12:38 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
DistillingHibernate wrote:
Interesting about the set's trick. So, I have to define hashCode() - like you said - and equals() as well.


yeah. you can specify in the hbm.xml files using meta attributes which fields you want it to use if you use the hibernate tools code gen tools.

Fields that won't change while the object is being used by the program are good to use, or business keys

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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