google-code-export / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
1 stars 0 forks source link

Extend Load Group functionality to any property, not just Ref<?> #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be very convenient to use Load Groups to skip properties to be loaded, 
for example sometimes I don't need to load a Blob like in:

@Load(Everything.class)
public Blob jsonBlob;

Objectify 5.0.3

Original issue reported on code.google.com by unify...@gmail.com on 8 Sep 2014 at 10:32

GoogleCodeExporter commented 9 years ago
Unfortunately this is not behavior natively supported by GAE. Projection 
queries are close, but not adequate to enable a feature like this. Sorry.

If you want something like this, you'll need to open a feature request in the 
GAE issue tracker.

Original comment by lhori...@gmail.com on 8 Sep 2014 at 10:50

GoogleCodeExporter commented 9 years ago
Could you please elaborate on your comment:"but not adequate to enable a 
feature like this". It looks very similar to what I requested. and It is 
natively supported since it is already in the projection queries.

I just want understand if:
a) It is hard to implement
b) Mayor changes to the architecture of the project would need to be made
c) You don't think it is useful
d) It would confuse users looking for Projection Queries, where not all 
features would be implemented.

Thanks for the clarification.

Regards

Original comment by unify...@gmail.com on 8 Sep 2014 at 11:04

GoogleCodeExporter commented 9 years ago
Similar, but inadequate for the feature you want. 

To take your example, you would need to specify a multiproperty index across 
all of the "other" fields and single property indexes on them too. If any of 
those fields are unindexable, you're SOL. Unless you specify Everything, you 
can only filter by the 'lead fields' of the multiproperty index. Oh, and none 
of this works with load-by-key operations, only with filtering queries.

I suspect you think projection queries are more powerful than they are. They 
only return extra data from an index without doing the final entity lookup; 
they're a slightly glorified keys-only query. They are useful for optimizing a 
few niche cases but they can't be used to support a general-purpose feature 
like load groups.

I'd be happy to elaborate more on the Objectify google group if you would like 
to open a discussion there.

Original comment by lhori...@gmail.com on 9 Sep 2014 at 7:32