fix wrong optional configuration in Field.Virtual

This commit is contained in:
John Estropia
2020-02-21 11:20:32 +09:00
parent 0df6c737c1
commit e1b03b4a89

View File

@@ -91,7 +91,6 @@ extension FieldContainer {
self.init( self.init(
keyPath: keyPath, keyPath: keyPath,
isOptional: false,
customGetter: customGetter, customGetter: customGetter,
customSetter: customSetter, customSetter: customSetter,
affectedByKeyPaths: affectedByKeyPaths affectedByKeyPaths: affectedByKeyPaths
@@ -283,7 +282,6 @@ extension FieldContainer {
fileprivate init( fileprivate init(
keyPath: KeyPathString, keyPath: KeyPathString,
isOptional: Bool,
customGetter: ((_ object: ObjectProxy<O>, _ field: ObjectProxy<O>.FieldProxy<V>) -> V)?, customGetter: ((_ object: ObjectProxy<O>, _ field: ObjectProxy<O>.FieldProxy<V>) -> V)?,
customSetter: ((_ object: ObjectProxy<O>, _ field: ObjectProxy<O>.FieldProxy<V>, _ newValue: V) -> Void)? , customSetter: ((_ object: ObjectProxy<O>, _ field: ObjectProxy<O>.FieldProxy<V>, _ newValue: V) -> Void)? ,
affectedByKeyPaths: @escaping () -> Set<KeyPathString>) { affectedByKeyPaths: @escaping () -> Set<KeyPathString>) {
@@ -292,7 +290,7 @@ extension FieldContainer {
self.entityDescriptionValues = { self.entityDescriptionValues = {
( (
attributeType: .undefinedAttributeType, attributeType: .undefinedAttributeType,
isOptional: isOptional, isOptional: true,
isTransient: true, isTransient: true,
allowsExternalBinaryDataStorage: false, allowsExternalBinaryDataStorage: false,
versionHashModifier: nil, versionHashModifier: nil,
@@ -325,7 +323,6 @@ extension FieldContainer.Virtual where V: FieldOptionalType {
self.init( self.init(
keyPath: keyPath, keyPath: keyPath,
isOptional: true,
customGetter: customGetter, customGetter: customGetter,
customSetter: customSetter, customSetter: customSetter,
affectedByKeyPaths: affectedByKeyPaths affectedByKeyPaths: affectedByKeyPaths