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

Issue #121: Prevent attribute from being set as property on resource if ... #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jsdalton
Copy link

...property is not defined

Per my comments on the issue, I'm not sure whether this behavior is desired or unintentional. The fix was easy though -- I just added a guard in the constructor that only sets _properties[key] if key is in Factory.properties, with an exception for the _rev attribute.

A few tests were (ab)using the ability to save arbitrary values so I defined those explicitly to get them working. This illustrates that the new behavior is backwards incompatible and could break for others who are setting and saving arbitrary attributes in this manner.

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

Successfully merging this pull request may close these issues.

1 participant