Hey,
I'll try to answer this, but I'm not an expert - would love to hear an
expert's opinion of my answer.
When you say "inside", it can be a bit misleading to me. If you're
talking about Embedded classes, the entire object is fetched, so that
wouldn't help for #1 or #2. If you are just talking about a field
reference to another object, e.g.
public class A {
private Long id;
private B child;
}
then I don't believe B will be "fetched" unless explicitly accessed.
At least, that is what the GAE Relationship Documentation for JDO
implies. I think Objectify is missing some documentation on how this
behavior works (or does it even work?). Regardless, your concerns
about Option #3 may still exist in Option #1 if Objectify doesn't
support cascading deletes, etc. I'm pretty sure Option #2 doesn't
work in any scenario.
Anyways, I use Option #3 and it works quite well. Your concerns are
valid, but can be handled with proper programming.
Jake
On May 22, 3:07 pm, Michael wrote:
> Hi,
>
> I am new to app engine (using it with GWT). I have a class with a lot
> of data in it. nearly 100% of the time my program only needs two of
> the fields. I want to break it up in to two classes: A (with the data
> needed often) and B (less common data). Class A is also sent back and
> fourth from the client and server often, so I think it's important
> that I can just send class A and not B to keep bandwidth down. How
> should I set it up, I see a few different ways
> 1 B inside of A
> 2 A Inside of B
> 3 A with a key to B
>
> Method 1 seems bad because I can't send A to the client without
> sending all of B. I am really new to Objectify, can I fetch just A
> (querying on one of the parameters) using method 2? Method 3 seems
> the only working way, but then I run the risk of a B with no A
> pointing to it or A pointing to B that doesn't exist if something
> happens while deleting. Is there a good way to avoid this? Or should
> I just keep all of my data in one large class?
>
> What do you think is the best method?
>
> --
> 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 google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group
> athttp://groups.google.com/group/google-appengine-java?hl=en.
--
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.