bidirectional relations?
This is an open discussion with 4 replies, filed under General.
Search
I think there used to be a field before - but nothing I've ever used - and probably unmaintained.
Right now I don't think there is anything - though in theory it's possible to add. Did something similar for a client but was just on a one-field basis, unfortunately was in a rush so took a hackish route to do it..
What's your knowledge of PHP? maybe I could give you the basics and you could take it on.
Jon
I got plenty of PHP know-how. Dont know alot about Symphony internals tho - so I look for advice.
A hack is what I got in my current project: got a db trigger to update both assoc fields if one changes. Symphony dosnt know about, and cant complain :p
I think it would be a great feature for the assoc field. I could imaging 2 solutions:
- creating 2 assoc fields that update each other if one changes.
- creating a kind of assoc field that can be a member of two sections, and always shows the "other end".
There's a third option which at this point would be the simplest.
Creating a field - where you select an inverse relationship. It shows the same ui as the original one but in reverse. It wouldn't store any data per-se but just edit the other field's data.
yes. think thats a good approch. thx.:)
Create an account or sign in to comment.
Hi,
I got 2 sections: a Category and a Item in this Category forming a clasic n:n relationship.
I would like to have a relation field in the Category called "Items" and a relation field in the Item called "Categories".
I would like that both relation fields match each other, allowing the content maintainer to configure the relation from the perspective of a Category or from the perspective of an Item.
Do you have any advice how tho realize something like this?
kind regards, Knut Meinke