{"action":"created","issue":{"url":"https://api.github.com/repos/vidigami/backbone-sql/issues/20","labels_url":"https://api.github.com/repos/vidigami/backbone-sql/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/vidigami/backbone-sql/issues/20/comments","events_url":"https://api.github.com/repos/vidigami/backbone-sql/issues/20/events","html_url":"https://github.com/vidigami/backbone-sql/issues/20","id":72447672,"number":20,"title":"Uncaught RangeError: Maximum call stack size exceeded","user":{"login":"marcelklehr","id":986878,"avatar_url":"https://avatars.githubusercontent.com/u/986878?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelklehr","html_url":"https://github.com/marcelklehr","followers_url":"https://api.github.com/users/marcelklehr/followers","following_url":"https://api.github.com/users/marcelklehr/following{/other_user}","gists_url":"https://api.github.com/users/marcelklehr/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelklehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelklehr/subscriptions","organizations_url":"https://api.github.com/users/marcelklehr/orgs","repos_url":"https://api.github.com/users/marcelklehr/repos","events_url":"https://api.github.com/users/marcelklehr/events{/privacy}","received_events_url":"https://api.github.com/users/marcelklehr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-01T14:52:56Z","updated_at":"2015-05-03T10:55:18Z","closed_at":null,"body":"I get this error on the server when creating an entity with a relation ."},"comment":{"url":"https://api.github.com/repos/vidigami/backbone-sql/issues/comments/98468043","html_url":"https://github.com/vidigami/backbone-sql/issues/20#issuecomment-98468043","issue_url":"https://api.github.com/repos/vidigami/backbone-sql/issues/20","id":98468043,"user":{"login":"marcelklehr","id":986878,"avatar_url":"https://avatars.githubusercontent.com/u/986878?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelklehr","html_url":"https://github.com/marcelklehr","followers_url":"https://api.github.com/users/marcelklehr/followers","following_url":"https://api.github.com/users/marcelklehr/following{/other_user}","gists_url":"https://api.github.com/users/marcelklehr/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelklehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelklehr/subscriptions","organizations_url":"https://api.github.com/users/marcelklehr/orgs","repos_url":"https://api.github.com/users/marcelklehr/repos","events_url":"https://api.github.com/users/marcelklehr/events{/privacy}","received_events_url":"https://api.github.com/users/marcelklehr/received_events","type":"User","site_admin":false},"created_at":"2015-05-03T10:55:18Z","updated_at":"2015-05-03T10:55:18Z","body":"For testing purposes I have a file that creates all the entities. This is the code that creates them:\r\n\r\n```js\r\nvar app = require('./')\r\n\r\nvar r219 = new app.Location({name: \"219\"})\r\nr219.save()\r\n\r\nvar r067 = new app.Location({name: \"067\"})\r\nr067.save()\r\n\r\n\r\n\r\nvar retAlmsdorf = new app.Retailer({name: 'Almsdorf'})\r\nretAlmsdorf.save()\r\n\r\nvar retOtto = new app.Retailer({name: 'Ottos Elektroladen'})\r\nretOtto.save()\r\n\r\nvar retQuelle = new app.Retailer({name: 'Quelle'})\r\nretQuelle.save()\r\n\r\nvar retMediamarkt = new app.Retailer({name: 'Mediamarkt'})\r\nretMediamarkt.save()\r\n\r\n\r\nvar typMonitor = new app.DeviceType({name: 'Monitor'})\r\nconsole.log('saving typMonitor')\r\ntypMonitor.save(function(er) {\r\n  console.log(er)\r\n  var iiyama = new app.Product({\r\n    name: 'ProLite'\r\n  , productId: 'E1906S' // vllt. gehört hier auch noch 'prolite' dazu? k.a.\r\n  , manufacturer: 'Iiyama'\r\n  , device_type: typMonitor\r\n  })\r\n  console.log('saving iiyama')\r\n  iiyama.save(function(er) {\r\n    console.log(er)\r\n    ;[['10CZC2275J1J', 'LRA028623', retAlmsdorf, '07/2012', r067]\r\n    , ['10CZC2275J1F', 'LRA028624', retOtto, '07/2012', r219]\r\n    , ['10CZC2275J15', 'LRA028625', retQuelle, '07/2012', r219]\r\n    ].forEach(function(record) {\r\n      (function\r\n       (serialId ,     lranummer ,     retailer   , acquisitionDate, room) {\r\n        var monitor = new app.Device({\r\n          product: iiyama\r\n        , serialNumber: serialId\r\n        , location: room\r\n        , lranr: lranummer\r\n        , retailer: retailer\r\n        , acquisitionDate: acquisitionDate\r\n\r\n        , price: '€7,42'\r\n        , comment: ''\r\n        })\r\n        console.log('saving '+lranummer)\r\n        monitor.save()\r\n      }).apply(null, record)\r\n    })\r\n\r\n  })\r\n\r\n})\r\n\r\nvar typPC = new app.DeviceType({name: 'PC'})\r\ntypPC.save(function() {\r\n\r\n\r\n  var hpcompaq = new app.Product({\r\n    name: 'Compaq'\r\n  , productId: '8200Elite' // vllt. gehört hier auch noch 'compaq' dazu? k.a.\r\n  , manufacturer: 'HP'\r\n  , device_type: typPC\r\n  })\r\n  hpcompaq.save(function() {\r\n\r\n    ;[['10CZC2275J1C', 'LRA028637', retMediamarkt, '07/2012', r067]\r\n    , ['10CZC2275J10', 'LRA028638', retQuelle, '07/2012', r219]\r\n    , ['10CZC2275J1G', 'LRA028639', retAlmsdorf, '07/2012', r219]\r\n    ].forEach(function(record) {\r\n      (function\r\n       (serialId ,     lranummer ,     retailer   , acquisitionDate, room) {\r\n        var pc = new app.Device({\r\n          product: hpcompaq\r\n        , serialNumber: serialId\r\n        , location: room\r\n        , lranr: lranummer\r\n        , retailer: retailer\r\n        , acquisitionDate: acquisitionDate\r\n\r\n        , price: '$7,45'\r\n        , comment: ''\r\n        })\r\n        pc.save()\r\n      }).apply(null, record)\r\n    })\r\n\r\n  })\r\n\r\n})\r\n```"}}