You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What it does assume is that for fetching association data other datasources must also be a database drivers. Otherwise it would make little sense trying to get them.
As a workaround for now, try to not fetch associations if you are using disimilar datasources. You can limit them by using $recursive = -1 in your model.
What should happen when you attempt to load associated data in a non-relational datastore? If queryAssociation() wasn't called then nothing would happen.
Created by skoranda (at gmail), 22nd Apr 2013. (originally Lighthouse ticket #3780):
The function queryAssociation in DboSource.php assumes that the data source instance has a queryAssociation() method in this code fragment:
if (!empty($fetch) && is_array($fetch)) {
if ($recursive > 0) {
foreach ($linkModel->associations() as $type1) {
foreach ($linkModel->{$type1} as $assoc1 => $assocData1) {
$deepModel = $linkModel->{$assoc1};
$tmpStack = $stack;
$tmpStack[] = $assoc1;
and then again in this code fragment:
if ($recursive > 0) {
foreach ($linkModel->associations() as $type1) {
foreach ($linkModel->{$type1} as $assoc1 => $assocData1) {
$deepModel = $linkModel->{$assoc1};
Not all data sources will have a queryAssociation method, especially when using models that do not use a relational database as the data store.
The text was updated successfully, but these errors were encountered: