openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Saint Croix" <>
Subject Re: Pinaki's blog entry on persisting a generic fields using @Type annotations
Date Sun, 13 Jan 2008 19:37:38 GMT
Thanks for the reply, Pinaki!

That is the idea behind 'transparent' persistence where domain models are
> not impacted in no (or minimal) way by the fact that the model instances
> are
> persistent.

> @Type annotation will let you model without strong-typing the relations.
> But
> the caveat is query on the relations' path will now be restricted.
> However,
> the programming paradigm of JPA-like technology *should* discourage query
> on
> relations path in favor of navigational traversal from 'root' instances
> located by EntityManager.find(). And if that practice is followed, @Type
> can
> be a powerful mechanics for generic model.

Right now I'm doing my CRUD and cascade tests using embedded OpenEJB.  I
have three questions--one general question and two about using the @Type
annotation as you did in your awesome blog entry.

First, I found I had to use LEFT JOIN FETCH for some of the objects in order
to get collection references in another class.  However, I was under the
impression that eager loading was the default setting.  Is this a mistaken

Second, I am not presently required to run a post-compilation enhancement of
my entities because of (I believe) the java agent that OpenEJB provides.
This might be a question for them, so I'll cc the openejb-users list.  By
using OpenJPA specific annotations, will I need to run post-compilation
enhancement of my entity classes and thus complicate my build somewhat?

Third, the non-spec compliant annotations are (obviously) not recognized by
my IDE, IntelliJ IDEA, which messes up the IDE a bit.  I'd like to keep the
IDE hints about JPA aspects, but.  Is there a plugin for IDEA that would
obviate this?  I'll play around with it.  I actually run my builds from M2,
so this is a minor issue compared with #2.

> > I read your blog entry on persisting a generic graph and am very
> > interested
> > in using something similar to this for some of my entities.
>   Glad that my blog ramblings could point to some ideas for your
> application design.
> > Before anything else, I'm very sorry about the typo in your name in my
> > last post.  :-(
>   my name has experienced being morphed in very many ways :)  One that
> really broke my heart was 'Pinki' :(
> --
> View this message in context:
> Sent from the OpenJPA Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message