I’m stuck trying to implement a data model for an app to be deployed on AppEngine.
Here’s an example of the model:
EntityName
id: 1
author: 'me'
description: 'whatever'
datetime: 2011 etc.
events: [
{location: [1,2], phase: ['A', 'B']},
{location: [3,4], phase: ['C', 'B']},
... more events ...
]
Explanation:
EntityNamehas a few attributes, and manyevents- each
eventhas a list of numbers (itslocation) and a list of strings (phase)
How can this model be implemented in AppEngine? The data only needs to be searchable by id, author, datetime, and description.
What I’ve tried to figure out how to do (still going through the docs) (sticking point in italics):
- one table,
EntityName, witheventsas aListProperty
this would require nested lists in one table … not sure if that’s possible - two tables,
EntityNameandEvent
needs a join, which I understand isn’t directly possible
These aren’t tables, exactly, but I think this should work for you
Then…
See the documentation for details. You don’t need to “do a join” because this isn’t a SQL database. For your convenience, collection_name will create an iterator on the referenced side of a one-to-many relationship.