-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduler on adding calendar entry causes Maximum call stack size exceeded #3
Comments
This should work, I'm using it too to add items with the default form. Which DataSource are you using? You need to use the kendo.data.breeze.SchedulerSource and |
Hi I am using both of those... do you know if this works with GUID data type? I am trying to work out what else might be different from the standard example. thanks |
I never used it with GUID data types. But not sure if this is even an issue with the datasource or if it is with Kendo controls. Which version of the Kendo controls are you using (I haven't used it with anything newer than 2015.1.429)? Also you can try to debug: Useful breakpoints might be here (for reading) and here for creating a new item. |
Some more info: I am using a GUID as a primary key when i click on the scheduler to add it, it throws an exception: Uncaught Error: Cannot attach an object of type (Appointment:#MedDev.Entity) to an EntityManager without first setting its key or setting its entityType 'AutoGeneratedKeyType' property to something other than 'None' So i added the following:
This autogenerates the key which i can see happening. However i am not sure why when i click the save button on the template form it just causes the stack error. |
I am using the latest version of kendo ui....2015.3.1111 |
what is strange is that
Something on add seems to be broken. |
Can you debug to check when the exception is thrown on creating an item and who is creating it (Kendo, the DataSource or Breeze)? And what exactly is the exception? For example the Are you reaching the create breakpoint or is the exception thrown before? |
Ok... This is what i can see:
RangeError: Maximum call stack size exceeded It never reaches the create method - so no server request is ever sent |
Can you check if after the case 'add' the entities in syncItems should take care of that as it does after reading the items. |
No these all seem to be removed..... |
Unfortunately running out of ideas. Removing circular properties from breeze entities is the main job of the data source, and this seems to work fine. I assume Telerik has changed something in Kendo in one of the newer versions. Maybe you can try your luck with the Telerik support (even though they are usually not really helpful for this kind of stuff). |
Hi So i have tried pretty much everything even using an extremely simple database table and this still seems to break. Maybe its the newer version of kendo. |
Hi Pascal It seems that the error is thrown at:
on the line :
When i look inside the saveResult object there is a data object. that data object contains circular properties such as entityAspect etc. This then causes kendo to fail.... any idea how i could strip them out? |
I have changed:
to:
And that seems to be ok.... i will continue testing... |
Have you changed something else since you stated before that the create method is never called and the exception is thrown before? |
The scheduler dialog is still closed if you call |
Hi The form does close and the record is saved. But now there is another issue. Only fields with the same name as kendo scheduler fields are saved back to the database... So for example my database field name is StartDate not start, so it does not save this data to the database....? For reading data from the database it seems to work fine... but saving it to the entity object breaks.. Do you know where/how i can access the entity object linked to the form so that i can populate it manually? |
i have a little example my schema mapping is as follows:
I also have an additional field called description which i dont map because its exactly the same. only description field is saved to the database. |
Sorry, I'm not really familiar with all this stuff. If you need helpto map the fields you should ask the Breeze guys. If you want to bind different fields to the form, you should check with Teleriks support. I assume you would need to change the template of the form. In this case you also might need to make sure that the fields are properly initialized on creating a new model (as done here for the default fields) |
When i read the database it maps the fields correctly to because i am using telerik schema property. |
Firstly this is such a fantastic library - thank you.
When i use the library. Updates and Deletes seem to work correctly however adding an item to the scheduler using the template form causes the same Maximum call stack size exceeded error that one normally gets when using breeze without this library.
Is adding items supported? i have tried to debug the library but i am not getting very far in determining where the problem may be.
Any suggestions?
The text was updated successfully, but these errors were encountered: