Skip to content
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

submodals with static throw error on create #32

Open
terinjokes opened this issue May 23, 2016 · 0 comments
Open

submodals with static throw error on create #32

terinjokes opened this issue May 23, 2016 · 0 comments

Comments

@terinjokes
Copy link
Contributor

var MyModel = new verymodel.Model({
  id: {type: 'string', static: true},
  owner: {model: {
    owner_id: {type: 'string', static: true}
  }}
});

var model = MyModel.create({
  id: 'foobar',
  owner: {
    owner_id: 'fizzbuzz'
  }
});

// Error: Cannot set static values
//    at Object.owner_id (…/node_modules/verymodel/lib/model.js:347:27)

Identified in cloudflare/node-cloudflare#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant