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

Attribute added in beforeCreate hook not serialized into payload #725

Open
nickschot opened this issue Oct 24, 2017 · 1 comment
Open

Attribute added in beforeCreate hook not serialized into payload #725

nickschot opened this issue Oct 24, 2017 · 1 comment

Comments

@nickschot
Copy link
Contributor

  • Platform: MacOS 10.13
  • Database: Postgres 9.6
  • Lux Version: 1.2.2
  • Node Version: 8.7.0

When using the beforeCreate (and probably some of the other hooks too) to set a model attribute which is not set by the request, it is not serialized/returned in the payload/response.

Changing attributes which already exist in the request in the same way works fine.

@jamemackson
Copy link
Contributor

I am doing something similar to this where I will set the id attribute in beforeCreate and beforeUpdate and haven't had any trouble with this.

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

2 participants