[google-appengine] Re: [appengine-java] Re: Some design Issues in appengine datastore

2009-04-30 Thread Max Ross
Hi Vijay, Your questions are going to take some time to answer. Some are easier than others. I'd recommend splitting them up into separate posts. Max On Thu, Apr 30, 2009 at 9:27 PM, vijay wrote: > Ping!! > > > On Thu, Apr 30, 2009 at 5:03 PM, vijay wrote: > >> Hello All,I am working on an a

[google-appengine] Re: [appengine-java] Re: Some design Issues in appengine datastore

2009-04-30 Thread 风笑雪
Why don't you let the category to be a property of your model? class Food(db.Model): category1 = ... category2 = ... ... Food(category1=fruit, category2=red, ...) 2009/5/1 Max Ross > > Hi Vijay, > > Your questions are going to take some time to answer. Some are easier than > others. I'd

[google-appengine] Re: [appengine-java] Re: Some design Issues in appengine datastore

2009-04-30 Thread Pranav Prakash
Hi Vijay, You can try the following database model. class FoodAndAll(db.Model): name = db.StringProperty() parent = db.SelfReferenceProperty() ... ... In my view, this class does all your needs. The class has two properties 1. Name 2. Reference to Parent Class 3. Other optional things

[google-appengine] Re: [appengine-java] Re: Some design Issues in appengine datastore

2009-04-30 Thread 风笑雪
I think it's not reasonable. The datastore is used to store entities, they should be real objects. And "red" or "green" should be an abstract class, how can you reference to a "red" object? Other side, when you want save a food entity, you have to get or create a parent class's object. That means