Closed ysshir closed 3 years ago
Why?
You specify explicitly that the cache should not be checked, which causes a new object to be created for every result.
This could be my misunderstanding.
I just though I could get the result from DB for the query, even I already loaded one of the model.
and the result,$grand_children[1]->child
and $grand_children[2]->child
are not same instance, is very strange for me.
I mean ->from_cache(false)
is for the query, not for entire model creating method.
that's why I forged the Model in the process_row method.
still I feel little bit kind of uncomfortable thing, But yes, now I get it.
sorry for bother you. thanks.
I understand your reasoning, but to make this work, from_array()
should ignore the cache on creation of the first child object, but use the cache on subsequent child objects. Which means it would need to track all object creation, which would become quite complex very fast...
Thank you for fixing #435 and #438.
But there is another problem. https://github.com/fuel/orm/pull/435#issuecomment-689612208
tables..
parent
child
grand_child
Models...
problems