Ticket #1359 (closed defect: invalid)
isset does not work on the referenced side of one-to-one relations
| Reported by: | pstradomski | Owned by: | romanb |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Relations | Version: | 1.0.0 |
| Severity: | Keywords: | ||
| Cc: | pstradomski@… | Has Test: | no |
| Status: | Pending Core Response | Has Patch: | no |
Description (last modified by pstradomski) (diff)
User: id (primary key), other fields Email: id (PK), userId (FK), email(string); defined named relation user (foreignType=one, foreignAlias=email)
//in the database there's user with id = 6, and an email with id=1 and userid=6
$u = Doctrine::getTable('User')->find(6);
var_dump(isset($u->email)); // returns false
var_dump($u->email->toArray()); // shows that the record exists and is not a newly created one, because it has email column filled.
The code was exported from 1.0 branch yesterday.
Change History
Note: See
TracTickets for help on using
tickets.