Bug #1015
_ValueOrPrimary returns Record objects
Description
In some cases, the _ValueOrPrimary
method will still return a Record
type.
This happens when the primary key of the Record being saved (as value) is itself a Record. The correct behavior is to continue getting the key of the Record until a non-record value is found instead.
Associated revisions
History
#1 Updated by Elmer de Looff about 12 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 70
Applied in changeset 7ab7be6ea7eb.
#2 Updated by Elmer de Looff about 12 years ago
The implementation has been changed from a single operation to an iterative one. The primary key resolving runs as long as the primary key returns a BaseRecord
type.
#3 Updated by Elmer de Looff about 12 years ago
- Status changed from Resolved to Closed
- % Done changed from 70 to 100
Added a functioning 'pop' method to the Record class, which works using the automatic loading of references. Method GetRaw has been added to return the raw value of a field, suppressing autoloading. Also fixed the bug where if a primary key was another record, the record would be inserted in the database instead of that primary key. This resolves #1015.