Skip to content

A minimal Sproutcore app that displays an issue with pushing complex child nested records onto complex parent nested records. records. The issue doesn't appear in the SC test harness.

Notifications You must be signed in to change notification settings

OliverM/nested_records_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

==========================================================================
Project:   NestedRecordsTest
==========================================================================

This is a minimal app of simple nested record definitions to show an issue where if you:
- create a nested record of three or more levels with collections of nested records on each level
- then push a new nested record with two or more levels of nesting onto an existing record's collection of same
- then do the same again

... you'll get a stack blowout.

The issue doesn't appear in the testing environment, so I created this minimal app to show the issue.

Run NestedRecordsTest.runTests() in the console to see the issue in action. This is defined in core.js.

I've created an analogous test case in the models folder, which I could tweak if anyone knew how to make the issue appear in the testing environment. That's at:
https://github.com/OliverM/nested_records_test/blob/master/apps/nested_records_test/tests/models/nested_record_complex_array_pushObj.js

UPDATE 11/07/11: This has been resolved; the error starts due to createRecord() trying to handle an attribute hash that includes some full SC.Records in the nested record array. Read the full embarrassing tale at sproutcore/sproutcore#545

About

A minimal Sproutcore app that displays an issue with pushing complex child nested records onto complex parent nested records. records. The issue doesn't appear in the SC test harness.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published