I'm building an AppEngine model class. I need a simple list of tuples:
class MyTuple(object):
field1 = "string"
field2 = 3
class MyModel(db.Model):
the_list = db.ListProperty(MyTuple)
This does not work, since AppEngine does not accept MyTuple as a valid field.
Solutions I can think of:
Make MyTuple extend db.Model. But doesn't that mean every entry in the list will be stored in a dedicated MyTuple table?
Make it a list of strings, which are a "serialized" form of MyTuple; add parsing (unserializing) code. Yuck.
Maintain two lists (one of strings, one of ints). Another yuck.
Any other solution that I'm missing?