Declined
Last Updated: 14 May 2021 08:10 by ADMIN
Imported User
Created on: 12 Jul 2014 22:26
Category: Data Source
Type: Feature Request
3
Ability to handle a data source with circular references
I ran into this problem wherein I receive a 'Maximum stack size exceeded error' when I try to bind a collection with circular references  to kendo ui grids and data viz charts.  My Angular SPA is using breeze to fetch server-side entity models. As these are entity models, they do have circular references. I am also using the angular-kendo library for the directives.

Current fixes include manual removal of such entities from the collection. It would be great if the controls can handle such collections.
3 comments
ADMIN
Viktor Tachev
Posted on: 14 May 2021 08:10

Hi,

In order to avoid circular reference exceptions it is recommended to create a ViewModel and exclude the properties that create circular references. The process is described in the following article.

https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/faq#how-can-i-avoid-circular-reference-exceptions

 

Regards,
Viktor Tachev
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Imported User
Posted on: 22 Jul 2014 09:52
Breeze appears to be adding two properties the _backingStore and entityAspect which has the cyclic references apart from entities themselves (as it is entityModel based). I did manage to bind these collections by using a modified version of cycle.js. Maybe a property naming convention which the UI controls explicitly ignore while binding can be helpful. This will be very helpful as both two way binding, and state tracking of entities can be achieved on the client side. 
ADMIN
Telerik Admin
Posted on: 18 Jul 2014 11:58
To understand your request better, can you elaborate on how you would expect the data source to resolve/handle circular references without going into infinite loop?

Also do you know of other third-party data source components which handle this scenario, and if so can you point us to them?