I am not sure, it depends on what you want to implement. Anyway, storing 10k updates in a single entity will definitely exceed 1mb limit. Moreover, you wouldn't be needing all the updates at a time, it will be very inefficient implementation if you fetch all updates when you just need a few (say 10 or 20).
Putting updates in a separate class will help you to implement efficient pagination. It will be easy to add and delete an updates. On 13 June 2010 11:54, nischalshetty <[email protected]> wrote: > Thank you Prashant. I guess that's the second option of disowned > entities that you are talking about. Is that the best way to do this? > > -N > > On Jun 13, 11:20 am, Prashant <[email protected]> wrote: > > you can keep a separate status class, which will store only one update > per > > class. Every time user updates her status, create a new update class and > > persist it > > > > Update { > > private long userid; > > private string status; > > > > } > > > > when you need to display update just fetch all update entities where > userid > > == User's id. > > > > On 13 June 2010 11:44, nischalshetty <[email protected]> wrote: > > > > > > > > > Hi All, > > > > > I need to clear a few doubts. Let's take an example so that you know > > > what my doubt is : > > > > > I have a User object and each user performs an operation - say a > > > status update. > > > > > User { > > > > > private Long id; > > > > > private List<StatusUpdate> updates; > > > > > } > > > > > Now this seems all good but if I'm not wrong Appengine has no > > > provision for lazy loading. Now my problem is, when a users > > > StatusUpdate reaches say 100k or more, the List in the above case > > > would have so many objects in it which I obviously do not need. > > > > > What solution is better? Make StatusUpdate as an unowned class and > > > keeping a reference to User? Any thoughts, I hope I am clear with my > > > requirement. > > > > > -Nischal > > > > > -- > > > 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]<google-appengine-java%[email protected]><google-appengine-java%2B > [email protected]> > > > . > > > For more options, visit this group at > > >http://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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://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 [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.
