Ticket #1131 (closed defect: fixed)
$record->get('foo_id') returns related record 'Foo' instead of field value
| Reported by: | mahono | Owned by: | romanb |
|---|---|---|---|
| Priority: | major | Milestone: | 2.0.0 (OLD) |
| Component: | Record | Version: | 1.0.0 |
| Severity: | Keywords: | get related record | |
| Cc: | Has Test: | yes | |
| Status: | Pending Core Response | Has Patch: | no |
Description
Longer version: I have a record with this (shortened) table definition:
setTableDefinition(): $this->hasColumn('foo_id', 'integer');
setUp(): $this->hasOne('Foo', array('local' => 'foo_id', 'foreign' => 'id'));
- BEFORE I access $record->Foo, $record->get('foo_id') works fine (returns the assigned integer).
- AFTER I access $record->Foo, $record->get('foo_id') returns $this->Foo.
So for me it is a bug, isn't it?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.