So does this mean I'm going about building my app structure the wrong way?

I'm building something that has a structure something like this:

Company --> Building --> EnergySupply --> EnergyReading

In each case the relationship is a hasMany, so there could be a Company 
that has say 100 Buildings with dozens of EnergySupply objects on each and 
then dozens of Readings on each... I'm currently storing each list of child 
entities as a List<Key<T>> in the entity using Objectify. Should I be using 
@Embed or something like that? I currently have an MVP triplet for each 
page to allow users to view and edit each object, and every time I load a 
page I am making a call to the datastore. It's just a simple get() using 
Ofy because I am passing the key in as part of the history token, so isn't 
that going to be quite fast? I don't see the need to load the data from 
every EnergyReading, EnergySupply and Building a Company has if the user 
just wants to go to the company details page, add a phone number and then 
do and do something else. Any advice on this kind of structure? Some kind 
of lazy loading perhaps? Tell me to RTFM if there's something I'm totally 
not getting.

Thanks,

Drew

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/388hWgtS6fUJ.
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?hl=en.

Reply via email to