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.
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.
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.
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.
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?