manage_relationship does not insert
I just tried to create a
:register
action for Entity to create Member with actor
as owner, but it only inserts in entities table14 Replies
That syntax is incorrect
Not sure where the do block w/ input came from (I suspect an LLM?)
When you want to provide input like that, (i.e not map an argument value directly to a manage_relationship) then you have to do it in a custom change
Please see the #rules
AI generated code must also be marked as such, especially when requesting support or help related to it.(no worries, its a new rule)
Sorry about that. It worked, still cannot get the actor in there :))))
context.actor
Somehow passing for_create(:register, actor: user) does not work in tests
And when I add the relationship to Entity, the entity_id does not get added, and it is not present in the changeset, Should I manually create it in
after_change
? Or is there a way to specify that after creating Entity, the id should be put in relationshipsYou don't need to add the entity_id
manage_relationship
handles that
It handles the source_attribute at least, if that is what entity_id
isThat looks right to me
I have made something like this, can't get LLM to write me a simple manage_relationshiop

What does the relationship look like?
is
entity_id
the source_attribute?What does the primary create action look like on member?
This is also LLM code
adding all the arguments
Isn't accept enough?
Just removed
argument
rows and it worked fineYeah those arguments shouldn't be there 😄
Just the
accept