Ticket #982 (closed defect: fixed)
LocalKey considers and id of 0 to be empty
| Reported by: | wizhippo | Owned by: | romanb |
|---|---|---|---|
| Priority: | major | Milestone: | 0.11.0 |
| Component: | Relations | Version: | 0.11.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | ||
| Status: | Has Patch: |
Description
If your table uses 0 as a key then the related class will not be loaded as Doctrine beleives it to be empty.
In Relation/LocalKey.php on line 49:
if (empty($id)
! $this->definitiontable?->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { if the id = 0 it is considered empty.
I don't believe this should be the case as 0 can be a valid id value.
see for a more details http://groups.google.com/group/doctrine-user/browse_thread/thread/167407b0c187866d#
Change History
Note: See TracTickets for help on using tickets.Download in other formats: