From 62107f880b1ac0e22fcc4ed164adf550cf1fecc5 Mon Sep 17 00:00:00 2001 From: yoh Date: Wed, 6 May 2020 00:44:28 +0200 Subject: [PATCH] fix Atlas product -> images relations I think the `image` relation must target `images.imageable_id` instead of `images.id` ?! --- atlas_21/src/Product/ProductRelationships.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atlas_21/src/Product/ProductRelationships.php b/atlas_21/src/Product/ProductRelationships.php index 6ebb0935..780b61fd 100644 --- a/atlas_21/src/Product/ProductRelationships.php +++ b/atlas_21/src/Product/ProductRelationships.php @@ -18,6 +18,8 @@ protected function define() ]); $this->oneToMany('taggings', ProductsTag::CLASS); $this->manyToMany('tags', Tag::CLASS, 'taggings'); - $this->oneToMany('images', Image::CLASS)->where('imageable_type = ', 'product'); + $this->oneToMany('images', Image::CLASS, [ + 'id' => 'imageable_id' + ])->where('imageable_type = ', 'product'); } }