Screenrecording of what happened
artist one-to-many with artworks one-to-many with images
images collection contains file field
The artwork added in artist should be saved successfully
The artwork is not saved
Screenrecording of overall steps using the demo
@benhaynes @rijkvanzanten
This issue occurs as Select Existing passing whole object instead of PK for O2M.

This issue does not occur when file is not stored in the artwork cause of recursive relation as shown in the above screenshot (image contains artwork object too.).
We have a feature request to handle recursive relational data but for now, It seems like we should restrict the whole object to pass as payload as O2M and M2M for Select Existing from APP.
Let me know your thoughts.
Thanks Binal — I defer to @rijkvanzanten on this one. :)
@rijkvanzanten - 🔔
The o2m doesn't diff nested objects, so it's not smart enough about filtering out what information to send about the file to the API
@benhaynes @rijkvanzanten @bjgajjar this is not only happening for files, but for any relationship where the target has any other relationship, when selecting.
Parent/Child:
Child/Grandchild:
Happy path:
child which has no grandchild to the parentchild which has a grandchild to the parentSaved successfully, but if you open the record again, you'll find child was not saved at allThis affects pretty much every O2M where the destination has any other relationship. Bug severity _might_ be larger, because pretty much a lot of setups have multiple O2M relationships, and it's really hard to restrict every collection to have only one single relational field, and given that the success message can also mislead people into moving on and thinking everything is fine.
Most helpful comment
@benhaynes @rijkvanzanten
This issue occurs as
Select Existingpassing whole object instead of PK forO2M.This issue does not occur when
fileis not stored in theartworkcause of recursive relation as shown in the above screenshot (imagecontainsartworkobject too.).We have a feature request to handle recursive relational data but for now, It seems like we should restrict the whole object to pass as payload as
O2MandM2MforSelect ExistingfromAPP.Let me know your thoughts.