Skip to content

Commit f0c1066

Browse files
authored
Merge pull request #4 from yoh/patch-1
fix Atlas product -> images relations
2 parents 89f9b99 + 62107f8 commit f0c1066

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

atlas_21/src/Product/ProductRelationships.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ protected function define()
1818
]);
1919
$this->oneToMany('taggings', ProductsTag::CLASS);
2020
$this->manyToMany('tags', Tag::CLASS, 'taggings');
21-
$this->oneToMany('images', Image::CLASS)->where('imageable_type = ', 'product');
21+
$this->oneToMany('images', Image::CLASS, [
22+
'id' => 'imageable_id'
23+
])->where('imageable_type = ', 'product');
2224
}
2325
}

0 commit comments

Comments
 (0)