fix for wrong sequence name quoting
fix for wrong sequence name quoting 2
reverted test to quoted rname
rname passed asis. freedom in table names and field names. Case sensitivity in field and table names
removed test of allowed char sequence in table and field names, there is no limit anymore
fixed some troubles with postgresql drop(). Better Row.__getitem__(): should not be much slower. Added a ignore_field_case parameter to allow Field('F')!=Field('f') on databases supporting case sesitivity.
different mysql drivers handled in quoting test.
improved handling of foreing keys
fix with quoted names in SQLTABLE. fix for ORDER BY
handle references on non "id" fields
check reference expression against table list first
As per
http://code.google.com/p/appengine-ndb-experiment/issues/detail?id=208
("List items from repeated StringProperty get mutated to _BaseValue on
put") it seems to be expected behavior that lists in NDB models get
mutated to _BaseValue lists after .put() is called.
In web2py this corresponds to:
------------
db.define_table('listintegertest',
Field('dummy', 'boolean'),
Field('integerlist', 'list:integer'),
Field('stringlist', 'list:string'),
)
iidee = db.listintegertest.insert(
integerlist=[1,2,3,4],
stringlist=["1","2","3","4"]
)
row = db.listintegertest(iidee)
db.listintegertest[row.id] = dict(dummy=True)
print "type is %s" % (type(row.integerlist[0]))
print "type is %s" % (type(row.stringlist[0]))
------------
The output of the above is currently:
type is <class 'google.appengine.ext.ndb.model._BaseValue'>
type is <class 'google.appengine.ext.ndb.model._BaseValue'>
while this is expected:
type is <type 'int'>
type is <type 'unicode'>
The workaround is to copy the list from the NDB model instead of
relying on it not being changed afterwards.
list:reference is not affected since parse_list_references() already
recreates the list in NoSQLAdapter case.
For reference types the IntegerProperty class (no matter if NDB or
not) constructor is passed the referenced table name as the first
parameter.
For non-NDB, the first parameter is 'verbose_name'. For NDB, the first
parameter is 'name'.
In NDB mode this causes the property to have a wrong identity and
therefore references fail to work properly.
The verbose_name set in non-NDB mode is relatively harmless in
comparison, but seems to be wrong as well as it does not really make
sense.
Do not pass referenced table name to the IntegerProperty constructor in
either case.