aspose file tools*
The moose likes Object Relational Mapping and the fly likes Discussion OJB vs. Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Discussion OJB vs. Hibernate" Watch "Discussion OJB vs. Hibernate" New topic
Author

Discussion OJB vs. Hibernate

Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
I haven't used Hibernate yet. I used OJB on a project and it was pretty simple to use. I just wanted to get some opinions on which one is better.


Matthew Phillips
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Good question Mathew. I was just wondering myself. I had spent over two weeks trying to get a simple 1:1 relationship to save to both tables, or just one for that matter. I found that using OJB with MySQL to be tough, especially if you use an auto-increment data-type.
I want to know if Hibernate is easier?
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Boon Subra
Ranch Hand

Joined: Jul 18, 2001
Posts: 69
Hi,
Can you pl let me know the procedures to implement ojb with oracle.I am trying to implement it for Struts.
I do not know which to choose OJB or Hibernate.
I want to know both rather.
Thanks,
Bhuvana
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

As far as I know OJB doesn't implement lazy loading, and I think OQL isn't as rich as HQL, nor does OJB support native SQL. Might be wrong, since I have only ever used it during an evalutaion and never on a proper project, so please correct me if I am. I would be interested to hear if anyone has use both Hibernate and OJB on proper projects.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Don Stadler
Ranch Hand

Joined: Feb 10, 2004
Posts: 451
I cannot comment on OJB having no background in it, but I'm using Hibernate on my current project and am impressed. It seems fairly easy to use.
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Originally posted by Paul Sturrock:
As far as I know OJB doesn't implement lazy loading, and I think OQL isn't as rich as HQL, nor does OJB support native SQL. Might be wrong, since I have only ever used it during an evalutaion and never on a proper project, so please correct me if I am. I would be interested to hear if anyone has use both Hibernate and OJB on proper projects.

OJB definitely implements lazy loading. Actually, the feature sets of Hibernate and OJB are very similiar. The major difference between the two is that Hibernate definitely has more market penetration. That alone would make me want to choose Hibernate over OJB.

One interesting tidbit, OJB will eventually implement the JDO specification while Gavin has said that Hibernate never will. Of course, persistence in EJB 3.0 is basically going to become Hibernate...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Discussion OJB vs. Hibernate