You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by JS...@vinu.edu on 2003/03/31 22:33:01 UTC

OJB vs Hibernate

I'm guessing someone has already asked this, but I'm going to ask again.
I'm currently using OJB. I like OJB just fine, except the auto increment
part. Every time I restart my web app it jumps the count up ten. I know why
it does that and I'm guessing that if I set the increment count to one
instead of ten it would fix this. I'm not really sure I like all the tables
you have to create to run the ODMG part. I was thinking of switching to
Hibernate. I've looked at it some and it looks like it does the same thing
except the JDO. It does say it supports ODMG. Any input would be great.
Hey, maybe I'm just not using OJB right.


Thank You,

Justin A. Stanczak
Web Manager
Shake Learning Resource Center
Vincennes University
(812)888-5813



Re: OJB vs Hibernate

Posted by Max Rydahl Andersen <ma...@eos.dk>.
> > I was thinking of switching to
> > Hibernate. I've looked at it some and it looks like it does the same
thing
> > except the JDO. It does say it supports ODMG. Any input would be great.
> > Hey, maybe I'm just not using OJB right.
>
> If Hibernate is fully ODMG compliant they will also need tables to
> persistent collections.

> AFAIK they they don't support ODMG persistent collections right now.
> I looked at there ODMG stuff some time ago, and it was poor compared to
> our stuff. I don't know if they have improved in the last months.

Just to put the record straight:

Hibernate is not fully ODMG compliant, and have never claimed or intended to
be
(mainly because it complicates things unnecesarily IMHO :)

<praising on>
Hibernate got a ODMG3-style API, but the majority uses the native Hibernate
API as
it is simpler, stronger and more flexible ;) (especially now with Hibernate2
with its support for outer/left/right joins)
</praising off>

I could start comparing OJB and Hibernate, I've actually wanted to do that
for a long time....but I don't have
the time right now (gotta go to work :).....but maybe we (members of the two
teams) should get together and
make an objective comparison of the two frameworks - at least on the feature
and philosophical level, just to have
a page to refer this FAQ item to ?


I'm thinking of something like:

OJB does this, how does Hibernate handle that ?
Hibernate does this, how does OBJ handle that ?

Not just a "OJB got ODMG, Hibernate doesn't" or "Hibernate got
outer/left/right joins, OJB doesn't".
Each team should be able to provide a (small) argument on why it isn't
there,
what's the alternative or when it is comming (or why it is not comming)....

And it should not just end up in raw performance comparisons, mainly because
that has been done
and the SQL generated is more or less equivalent, so it should not matter
that much.....

What do you say ?

Best regards,
Max
Hibernate developer (which also knows OJB :)

> cheers,
> Thomas
>
>
>
> >
> >
> > Thank You,
> >
> > Justin A. Stanczak
> > Web Manager
> > Shake Learning Resource Center
> > Vincennes University
> > (812)888-5813
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


Re: OJB vs Hibernate

Posted by Thomas Mahler <th...@web.de>.
Hi Justin,

JStanczak@vinu.edu wrote:
> I'm guessing someone has already asked this, but I'm going to ask again.
> I'm currently using OJB. I like OJB just fine, except the auto increment
> part. Every time I restart my web app it jumps the count up ten. I know why
> it does that and I'm guessing that if I set the increment count to one
> instead of ten it would fix this. 

SOrry that's the way SequenceNumers work. It's not an OJB problem it's 
part of the concept. If you don't like the default mechanism you can use 
other autoincrement algorithms that behave better. There are several 
examples that rely on DB managed sequence numbers in the SequenceManager 
package.

> I'm not really sure I like all the tables
> you have to create to run the ODMG part.

It's not a question of choice for us. If you want to be ODMG compliant 
you have to provide persistent collections. To provide persistent 
collection you must be able to store them in the DB. Hence all those tables.

If you don't want to use ODMG persistent collection you don't need those 
tables!

> I was thinking of switching to
> Hibernate. I've looked at it some and it looks like it does the same thing
> except the JDO. It does say it supports ODMG. Any input would be great.
> Hey, maybe I'm just not using OJB right.

If Hibernate is fully ODMG compliant they will also need tables to 
persistent collections.

AFAIK they they don't support ODMG persistent collections right now.
I looked at there ODMG stuff some time ago, and it was poor compared to 
our stuff. I don't know if they have improved in the last months.

cheers,
Thomas



> 
> 
> Thank You,
> 
> Justin A. Stanczak
> Web Manager
> Shake Learning Resource Center
> Vincennes University
> (812)888-5813
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
>