Index: EOAccess/EOAttribute.h =================================================================== --- EOAccess/EOAttribute.h (revision 40502) +++ EOAccess/EOAttribute.h (working copy) @@ -194,6 +194,9 @@ - (void)setPrototype: (EOAttribute *)prototype; +- (void)setPrototype: (EOAttribute *)prototype + updatePropertyList: (NSDictionary *)propertyList; + - (void)setReadOnly: (BOOL)yn; - (void)setColumnName: (NSString *)columnName; Index: EOAccess/EOAttribute.m =================================================================== --- EOAccess/EOAttribute.m (revision 40502) +++ EOAccess/EOAttribute.m (working copy) @@ -149,7 +149,7 @@ EOAttribute *attr = [[_parent model] prototypeAttributeNamed: tmpString]; if (attr) - [self setPrototype: attr]; + [self setPrototype: attr updatePropertyList: propertyList]; } [self setExternalType: [propertyList objectForKey: @"externalType"]]; @@ -870,7 +870,8 @@ } } -- (void)setPrototype: (EOAttribute *)prototype +- (void)setPrototype: (EOAttribute *)prototype + updatePropertyList: (NSDictionary *)propertyList { if(_prototype != prototype && ![_prototypeName isEqualToString:[prototype name]]) @@ -883,7 +884,7 @@ ASSIGN(_prototype,[[self _parentModel]prototypeAttributeNamed:_prototypeName]); if(_prototype == nil) ASSIGN(_prototype,prototype); - [self _updateFromPrototype]; + [self _updateFromPrototype: propertyList]; } else { @@ -2284,6 +2285,21 @@ _flags.protoOverride = protoOverride; } +- (void) _updateFromPrototype:(NSDictionary *)propertyList +{ + int i=0; + // update propertyList + for(i = 0; i < EOATTRIBUTE_PROTO_OVERRIDE_BITS_COUNT; i++) + { + NSString* key = [GDL2_EOAttributeClass _keyForEnum:i]; + if (![propertyList objectForKey:key] && + [_prototype valueForKey:key] != nil) + [propertyList setValue: [_prototype valueForKey:key] + forKey: key]; + } + +} + - (void) _setOverrideForKeyEnum: (EOAttributeProtoOverrideBits)keyEnum { _flags.protoOverride|= 1 << keyEnum;