You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Attribute validations should be invoked when using the update methods inside the data method.
Additional context
I understand that the underlying logic of the data method is probably different from the standard set, update etc, but the data method is really helpful for performing conditional operations. For example, I might call the set or remove operation based on the value of an attribute. This behavior is not possible using the default method chaining technique.
The text was updated successfully, but these errors were encountered:
Describe the bug
When updating attributes via the
data()
update method, attribute validations are not invoked.ElectroDB Version
2.1.2
Entity/Service Definitions
Using this entity, note that there is a
validate
method on theprop1
attribute, which will fail if the attribute does not contain the substringfoo
.If we do this, then the validation fails as expected, and we get an error.
However, if we do this instead, then the validation does not fail. In fact, the
validate
callback is not invoked at all.Expected behavior
Attribute validations should be invoked when using the update methods inside the
data
method.Additional context
I understand that the underlying logic of the
data
method is probably different from the standardset
,update
etc, but thedata
method is really helpful for performing conditional operations. For example, I might call theset
orremove
operation based on the value of an attribute. This behavior is not possible using the default method chaining technique.The text was updated successfully, but these errors were encountered: