On 13 Mar 2010, at 05:52, Jeff Schnitzer wrote:

On Thu, Mar 11, 2010 at 8:56 PM, John Patterson <[email protected]> wrote:

I really don't see what you think is magical about an initialized instance. I repeat: by default this feature is off and all data is loaded as expected. No magic. No Proxies. Just simple plain POJOs. Definitely some FUD in the air tonight.

It really is instructive to follow how this feature (in the form of
proxies) evolved in Hibernate (and JPA).

Proxies are a completely different beast. If bytecode manipulation were used there are suddenly serialization problems to worry about. That is why Twig uses pure plain POJOs with NO magic. As simple as possible.

It started out, much like
your Activation annotations, being a static configuration on the
entity classes.  The problem is, sometimes you want more data to come
back and sometimes you want less data to come back.

This is controllable in *very* fine detail by Activation settings. Any class can have a default activation depth, any field can have an activation depth and the datastore as a whole can set the depth for any individual operation. This gives *complete* control over what is loaded and when.

So they added
FETCH to the HQL/EJBQL/JPAQL language.  I expect you will re-discover
all of these issues.

Your comparison to Hibernate is not really accurate. You see the the difference is that Hibernate was built to optimise working with RDBMS systems that can do JOINs and therefore fetch data in bulk. The datastore cannot do JOINs and probably never will so options like FETCH are just not required.

Activation is actually a concept borrowed from Db4o which has been tried and tested over many years.

John

--
You received this message because you are subscribed to the Google Groups "Google 
App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to