This is a migrated thread and some comments may be shown as answers.

Editing records loses relation to other tables

1 Answer 34 Views
Bugs & Issues
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Erick
Top achievements
Rank 2
Erick asked on 03 Apr 2015, 09:07 AM
Hi,

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,
Jelle

1 Answer, 1 is accepted

Sort by
0
Yosif
Telerik team
answered on 03 Apr 2015, 11:36 AM
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.

Regards,
Yosif
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
Bugs & Issues
Asked by
Erick
Top achievements
Rank 2
Answers by
Yosif
Telerik team
Share this question
or