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

Shallow copy or deep copy? #665

Open
ghost opened this issue Jun 30, 2015 · 0 comments
Open

Shallow copy or deep copy? #665

ghost opened this issue Jun 30, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2015

The note about the attributes object passed to validate() says:

This object is distinct from the current attributes of the model and from the parameters passed to the operation. Since it is created by shallow copy, it is not possible to change any Number, String, or Boolean attribute of the input within the function, but it is possible to change attributes in nested objects.

So, the nested objects can be changed because they are deep copied? Aren't nested objects the ones that are shallow copied and everything else (direct members of attributes object) is deep copied?

@ghost ghost changed the title Shallow copy instead or deep copy? Shallow copy or deep copy? Jun 30, 2015
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

0 participants