pimcore
pimcore copied to clipboard
[Bug]: Reverse Object Relation not working for object bricks
Expected behavior
When using object bricks with a many to many relationship (we call it product group) inside a dataobject i expect to use a reverse object relation in another data object (product) to show all product groups where the product is linked to.
Actual behavior
When adding a reverse relation to the dataobject (product) it wont give me a option to select the correct owner field.
Steps to reproduce
- Create a object brick with a Many-to-Many object relation. I will call my object brick kwantum, it has a many-to-many relationship with products

- Create a datobject (i will call it product group) wich will use the object brick


As you can see, all products are linked to the product group

- Create a dataobject (product, wich has the relationship with the kwantum object brick), add a reverse object relation and try to use the prdocut group data object (where the object brick is linked to)


As you can see there is no option to select the object brick to show all linked product groups.
Thanks a lot for reporting the issue. The issue was not considered by us as "Priority" or "Backlog", so we're not gonna work on that anytime soon. In case this is a bug report, please create a pull request fixing the issue, we'll then review it as soon as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request, we'll then decide whether we'd accept it or not. Thanks for your understanding.
FYI: I've also wanted to do this. I could get the Owner field to show up in the list by marking the actual field (kwantum.products) as "Visible in search". This will make it show in that "Owner field" dropdown as "kwantum~products". Problem is, it doesn't seem to actually work. I thought it did, but I just realized it doesn't. Works fine with fields that belong to the Owner class, but technically the bricks are a separate object that extend that main object.. I'm still on 6.9, the situation might be different in Pimcore X. I hope it is, because i'd like to have the functionality when I'm done with the upgrade :unamused: . Nope. just tried it on the Live pimcore demo.. still the same situation, you can make the field show with the "Visible in search", but it doesn't actually find the relations :unamused:
Just ran into the same problem. Had to create the field in the Data Object itself now, which means extra work. Unfortunately, not quite as simple.
Dear community, it's been a while since that issue was updated the last time, so we decided to close it for now. If you're still interested in contributing, feel free to add comments here or contact us before creating a pull request to discuss next steps.
Thanks for your understanding.