mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-13 23:23:29 +01:00
Observe of CoreStoreObject subclass issue #344
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Maxim-Inv on GitHub (Oct 16, 2020).
I try to make observer of the value like described in the documentation:
but stuck with the error:
Generic parameter 'Value' could not be inferredHere is my model:
And it's ok when I refactor my model to xcdatamodel (to use NSManagedObject subclass):
@Maxim-Inv commented on GitHub (Oct 16, 2020):
Maybe the documentation is a little out of date?
I can make it works with CoreStoreObject subclass changing this line to:
@JohnEstropia commented on GitHub (Oct 16, 2020):
Since you are using
@Field.Store, the syntax requires$like you have discovered.The documentation was using examples that used
Value.Requiredand friends, which are not propertyWrappers and thus not need the$syntax.@Maxim-Inv commented on GitHub (Oct 16, 2020):
Got it. Thanks.
I think it would be better to add this case to the documentation, what do you think?