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

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

...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