Hi,
I’d like to confirm the intended behaviour of DataProperty.isSettable. I expected isSettable to control whether a property is updatable (i.e., isSettable === false → property cannot be changed after creation). However, it appears that this flag also affects entity creation. When creating a new entity, properties with isSettable: false end up being initialized as undefined even for initial data from server.
Is this the expected behaviour, or should isSettable only apply to updates?
Reference:
|
_updateTargetFromRaw(target: StructuralObject, raw: any, rawValueFn: Function) { |
|
// called recursively for complex properties |
|
this.dataProperties.forEach((dp) => { |
|
if (!dp.isSettable) return; |
Thanks.
Hi,
I’d like to confirm the intended behaviour of DataProperty.isSettable. I expected
isSettableto control whether a property is updatable (i.e.,isSettable === false→ property cannot be changed after creation). However, it appears that this flag also affects entity creation. When creating a new entity, properties withisSettable: falseend up being initialized asundefinedeven for initial data from server.Is this the expected behaviour, or should
isSettableonly apply to updates?Reference:
breeze-client/src/entity-metadata.ts
Lines 1480 to 1483 in 45070ba
Thanks.