Bug Report #2098
ORM pulling related models fails on second attempt
|Assignee:||Ben Rogers||% Done:||
Here is the problem i've discovered:
$model = ORM::factory('table')->find(1);
//displays 1 record(correct)
//displays ALL records(incorrect)
"table" has many "relateds"
currently when looking at __get the problem lies in the fact that repeated calls to related tables are stored into an array, since an ORM object is returned with a where() function applied, future calls fail as find_all() has been called and clears the where command.
my solution, is to remove the caching of these related objects, this would pertain specifically to has_many, and has_and_belongs_to_many objects.
Updated by Ben Rogers over 3 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset r4604.