Hi @helje5
Thank you for quick solve previous issue
I use Tagged
Tagged structure also have Codable protocol realisation like RawValue type
Example
struct AccessTokenTagged {}
typealias AccessToken = Tagged<AccessTokenTagged, String>
@Model
final class StoredAccess: NSManagedObject {
var token: AccessToken
...
}
When compilation as result we can see
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unacceptable type of value for attribute: property = "token"; desired type = NSString; given type = _TtGC13ManagedModels10CodableBoxGV6Tagged6TaggedV5WE_UC17AccessTokenTaggedSS__; value = <_TtGC13ManagedModels10CodableBoxGV6Tagged6TaggedV5WE_UC17AccessTokenTaggedSS__: 0x600000336460>.'
It's strange, because ManagedModels use CodableBox for wrap Codable types. How we can solve it issue in current realisation?
Hi @helje5
Thank you for quick solve previous issue
I use Tagged
Tagged structure also have Codable protocol realisation like RawValue type
Example
When compilation as result we can see
It's strange, because ManagedModels use CodableBox for wrap Codable types. How we can solve it issue in current realisation?