Editing records loses relation to other tables

Thread is closed for posting
2 posts, 0 answers
  1. Erick
    Erick avatar
    81 posts
    Member since:
    Feb 2010

    Posted 03 Apr 2015 Link to this post


    When we edit some records in the backend services, sometimes this records will lose relation to other tables and will set it as 'not set'. At this time we have to check the records each time we saved it.

    Are you aware about this issue?

    Kind regards,
  2. Yosif
    Yosif avatar
    9 posts

    Posted 03 Apr 2015 Link to this post

    Hi Jelle,

    This is in fact known behavior, if you are editing the objects from our web portal. The cause could be that the referenced record in the other type doesn't exist, therefore the relation is invalid and cannot be resolved.
    When an item is selected in the portal and all its fields are loaded, the relation fields are additionally expanded in order to be displayed. Any referenced but missing objects are not part of the expanded result and later when you save the root object, only its valid relations are preserved.

    To avoid this behavior it is recommended to update such objects not from the portal, but using our REST API or SDKs. This way the values of the relation fields would stay the same, even if they point to non-existing objects.

    So, please check if the related item exists and the relation field has the correct Id. Also ensure that the field is related to the correct content type.

    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
Back to Top