experimental patch to disable automatic GAE indexing, thanks howesc

This commit is contained in:
mdipierro
2013-02-23 14:51:45 -06:00
parent 38cac5dd58
commit 40ceb92195
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.1-alpha.2+timestamp.2013.02.22.18.44.48
Version 2.4.1-alpha.2+timestamp.2013.02.23.14.51.03
+5 -2
View File
@@ -4501,6 +4501,9 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
if isinstance(polymodel,Table) and field.name in polymodel.fields():
continue
attr = {}
if isinstance(field.custom_qaulifier, dict):
#this is custom properties to add to the GAE field declartion
attr = field.custom_qualifier
field_type = field.type
if isinstance(field_type, SQLCustomType):
ftype = self.types[field_type.native or field_type.type](**attr)
@@ -4517,10 +4520,10 @@ class GoogleDatastoreAdapter(NoSQLAdapter):
if field.notnull:
attr = dict(required=True)
referenced = field_type[10:].strip()
ftype = self.types[field_type[:9]](referenced)
ftype = self.types[field_type[:9]](referenced, **attr)
elif field_type.startswith('list:reference'):
if field.notnull:
attr = dict(required=True)
attr['required'] = True
referenced = field_type[15:].strip()
ftype = self.types[field_type[:14]](**attr)
elif field_type.startswith('list:'):