Understanding "manage_relationship"
So I have a
many_to_many
relationship between the following resources.
Reactant
Source
3 Replies
ReactantSource
If I create a new
Reactant
as follows.
It works and creates a Reactant
while creating and relating two Sources
. If I then update the reactant as follows.
This also works unrelating both Sources
without destroying the Sources
from their table. Then if I update the reactant as below.
This works as expected relating the existing Source
from its table without creating a new Source
. But the following two updates fail after this update.
The error suggests its trying to create an entry in the join resource ReactantSource
which already exists.
I believe what you need the the
use_identities
option so it knows to look it up by certain keys
by default it only looks for priamry key matchesIt works as expected now! I had incorrectly assumed that, by default, it would use all identities and if any matched, trigger the
on_match
.