1

I have need to programmatically delete an event relation for an event, then add a new one, then do some updating of the event information, then update the event.

I have ran into some roadblocks:

If I try to handle deleting and adding the event relation after updating the event, I could get an error because the event relation (a resource) may have something else in that time slot (which doesn't matter, the fact it has something else is why I am removing it and adding another resource).

So, I try to remove it before updating the event and adding the new event relation (a resource). But then when I update the event, it restores all the deleted event relations AND keeps the newly added ones...

What is this behavior or restoring event relations I just deleted when the event is updated? I can't find anything that talks about this? Would deleting and adding the event relation in one transaction and then updating the event in another transaction fix this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.