Index: EOAccess/EOAttribute.m =================================================================== --- EOAccess/EOAttribute.m (revision 40502) +++ EOAccess/EOAttribute.m (working copy) @@ -148,8 +148,11 @@ { EOAttribute *attr = [[_parent model] prototypeAttributeNamed: tmpString]; - if (attr) + if (attr) { + _flags.protoOverride = 0; + [self _setOverrideAndUpdate:propertyList fromPrototype:attr]; [self setPrototype: attr]; + } } [self setExternalType: [propertyList objectForKey: @"externalType"]]; @@ -876,7 +879,7 @@ && ![_prototypeName isEqualToString:[prototype name]]) { [self willChange]; - _flags.protoOverride = 0; + // _flags.protoOverride = 0; ASSIGN(_prototypeName, [prototype name]); if (_prototypeName != nil) { @@ -2299,4 +2302,18 @@ return ((_prototype != nil && (_flags.protoOverride & 1 << keyEnum) == 0) ? YES : NO); } +- (void) _setOverrideAndUpdate: (NSDictionary *) propertyList + fromPrototype: (EOAttribute *) prototype +{ + int i=0; + for(i = 0; i < EOATTRIBUTE_PROTO_OVERRIDE_BITS_COUNT; i++) + { + NSString* key = [GDL2_EOAttributeClass _keyForEnum:i]; + if ([propertyList objectForKey:key]) + _flags.protoOverride|= 1 << i; + else if ([prototype valueForKey:key]) + [propertyList setValue:[prototype valueForKey:key] forKey:key]; + } +} + @end Index: EOAccess/EOAttributePriv.h =================================================================== --- EOAccess/EOAttributePriv.h (revision 40502) +++ EOAccess/EOAttributePriv.h (working copy) @@ -77,6 +77,8 @@ - (void)_setOverrideForKeyEnum: (EOAttributeProtoOverrideBits)keyEnum; - (BOOL)_isKeyEnumOverriden: (EOAttributeProtoOverrideBits)keyEnum; - (BOOL)_isKeyEnumDefinedByPrototype: (EOAttributeProtoOverrideBits)keyEnum; +- (void) _setOverrideAndUpdate: (NSDictionary *)propertyList + fromPrototype: (EOAttribute *)prototype; @end #endif /* __EOAttributePriv_h__ */