-
-
Save eightysteele/954656 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OccurrencePolygonSet(db.Model): | |
# Normal properties... | |
class Ecoregion(db.Model): | |
cluster = db.ReferenceProperty(OccurrencePolygonSet) | |
terms = db.StringListProperty() | |
# Other properties here... | |
# Find all ecoregions for a cluster where the ecoregion is introduced and g200Num is 2: | |
cluster = OccurrencePolygonSet.get(some_key) | |
Ecoregion.all().filter('cluster =', cluster).filter('terms = introduced').filter('g200Num =', 2).fetch() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment