web2py/web2py — pull request #312 by anssih (2013-12-01 21:47:14+00:00)
Title: Fix references with GAE in NDB mode

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.