Hi guys,

I just started learning app engine by developing a small application.
I am facing following problem:

1) I have following model
class Contact(db.Model):
  name = db.StringProperty()
  type = db.StringProperty()

class PhoneNumber(db.Model):
  contact = db.ReferenceProperty(Contact,
                                 collection_name='phone_numbers')
  phone_type = db.StringProperty()
  number = db.PhoneNumberProperty()

2) I need to fetch all contacts that are type 'A' and those contacts
should only contain phone numbers that have phone_type 'B' or 'C'

3) I have no idea how to solve this :) (One solution would be fetch
contacts and filter out "wrong" phone_types at application level, but
I think that is not best way to solve this)

Thanks in advance,
Tomi

--~--~---------~--~----~------------~-------~--~----~
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