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

Model.create ignoring field and virtual setters #113

Closed
buske opened this issue May 10, 2017 · 2 comments
Closed

Model.create ignoring field and virtual setters #113

buske opened this issue May 10, 2017 · 2 comments

Comments

@buske
Copy link
Contributor

buske commented May 10, 2017

Model setters are now being ignored on Model create. This error was introduced in commit c375111 as part of the feathers-sequelize 2.0 upgrade. In particular, this line: c375111#diff-1fdf421c05c1140f6d71444ea2b27638R115

Unlike most sequelize methods such as findAll where the raw option causes sequelize to return raw JSON data, this option bizarrely means something completely different for Model.create (see sequelize docs):

options.raw: If set to true, values will ignore field and virtual setters.

buske added a commit to rareconnect/feathers-sequelize that referenced this issue May 10, 2017
@wedneyyuri
Copy link

wedneyyuri commented May 17, 2017

Maybe it's also affecting the update method. After a fresh installation the PUT method is not working.

Steps:

  • Start a new project
  • Setup sequelize
  • Create the posts service
  • image
  • Create a new post
  • Update the post
  • Fetch the post from database

Full example project: https://github.com/wedneyyuri/feathers-sequelize-crud-example

@daffl
Copy link
Member

daffl commented Jun 9, 2017

Closed via #114

@daffl daffl closed this as completed Jun 9, 2017
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

3 participants