Good that you mentioned that. I know very little about Hibernate, so
it is enlightening.
My current design work mainly directed to move CayenneDataObject
functionality inside the framework to make a complex superclass
unneeded. As Java (rightfully IMO) doesn't support multiple
inheritance, having a framework superclass scares many ppl.
Otherwise the new design doesn't sacrifice a single CayenneDataObject
feature. Things are just done differently under the hood.
Relationships still have to be done via a level of indirection
(ValueHolder for to-one and good old List for to-many), so Cayenne is
still able to "inject" relationship behavior:
http://objectstyle.org/confluence/display/CAY/ObjectContext
Andrus
On Sep 8, 2005, at 11:53 PM, Gili wrote:
> This is one of those few moments where my Hibernate background
> can finally come in useful. As you well know, Hibernate revolves
> around POJO objects. Everyone seems to think this is a good thing,
> except me :) POJO objects, in theory, sound great. The problem is
> that with transparency you lose flexibility. Database rows are not
> really Java objects and when you pretend they are you end up with a
> lot of abstraction leaks.
>
> For example, when I invoke getFooArray() to get at a
> relationship, I might want to tweak the performance by declaring
> the page size, fetch limit, etc. So my point is this... feel free
> to move toward POJO but please ensure that it is still possible to
> tweak these performance settings on such "transparent queries".
> Hibernate's weakness is that it is not possible to use transparent
> attributes/relationships while tweaking their query settings.
>
> Also ... if you use it long enough you find out that you
> *still* need to wrap their so-called POJOs with a second level of
> objects. Hibernate forces you to expose many DB-specific operations
> (setters mostly) that end-users should not have access to. So
> either way you end up wrapping your first DB-access objects with a
> 2nd layer of user-accessible classes. That's why I prefer Cayenne.
> There is no disillusion about what DataObject is. It's meant to be
> a DB object with full accessibility to all its settings and
> wrapping it up in a 2nd level object is fairly easy to do. No
> frustration there.
This archive was generated by hypermail 2.0.0 : Fri Sep 09 2005 - 00:11:08 EDT