[IMP] raise exception when a DB request fetches ids it was not asked for
authorXavier Morel <xmo@openerp.com>
Mon, 7 Jul 2014 07:59:05 +0000 (09:59 +0200)
committerXavier Morel <xmo@openerp.com>
Mon, 7 Jul 2014 07:59:05 +0000 (09:59 +0200)
commit798ce97df4fc111c0e2e44f6776904a41fdab03d
treefba0e05df816f2f9a8c691e887e5c05ecaff3906
parent74de2461a1ebf41daf9025b2f8b9ecbbbe1f184a
[IMP] raise exception when a DB request fetches ids it was not asked for

Likely caused by a type incoherence e.g. providing an id as string when the
table uses integer ids. Postgres performs an implicit conversion from string
to integer[0], this wasn't much of an issue in the old API, whatever cache was
there would simply not be used, but because the new API's cache is part of its
behavior it has a semantic impact and can lead to infinite recursion.

[0] more precisely from quoted value, which is untyped
openerp/models.py