I want to model the classic post has many tags and tags has many posts
entities.

I've read the docs about modeling here:
http://code.google.com/intl/nl/appengine/articles/modeling.html

But i would like to know how other people do this...

class Post(db.Model):
  content = db.TextProperty()

class Tag(db.Model):
  name = db.StringProperty()

class PostTag(db.Model):
  post = db.ReferenceProperty(Post,
                                 required=True,
                                 collection_name='posts')
  tag= db.ReferenceProperty(Tag,
                                 required=True,
                                 collection_name='tags')

Thanks a lot!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to