Project

General

Profile

Bug #1015

_ValueOrPrimary returns Record objects

Added by Elmer de Looff about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Elmer de Looff
Category:
Model
Target version:
Start date:
2012-10-10
Due date:
% Done:

100%

Estimated time:
Spent time:

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

Revision 302:7ab7be6ea7eb (diff)
Added by Elmer de Looff about 7 years ago

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.

History

#1 Updated by Elmer de Looff about 7 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 7 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 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 70 to 100

Also available in: Atom PDF