Index: EOEntityPriv.h =================================================================== --- EOEntityPriv.h (revision 26465) +++ EOEntityPriv.h (working copy) @@ -92,6 +92,7 @@ - (Class)classForObjectWithGlobalID: (EOKeyGlobalID *)globalID; - (id)globalIDForRow: (NSDictionary *)row isFinal: (BOOL)isFinal; +- (BOOL) _hasAnyAttributeNamed:(NSString *)name; @end @interface EOEntity (EOEntityRelationshipPrivate) Index: EOAttribute.m =================================================================== --- EOAttribute.m (revision 26465) +++ EOAttribute.m (working copy) @@ -739,7 +739,7 @@ name, *p] userInfo: nil]; - if ([[self entity] attributeNamed:name]) + if ([[self entity] _hasAnyAttributeNamed:name]) exc++; else if ((storedProcedures = [[[self entity] model] storedProcedures])) { Index: EOEntity.m =================================================================== --- EOEntity.m (revision 26465) +++ EOEntity.m (working copy) @@ -918,6 +918,13 @@ return attr; } +/* private method for finding out if there is an attribute with a name + without triggering lazy loading */ +- (BOOL) _hasAnyAttributeNamed:(NSString *)name +{ + return [[_attributes valueForKey:@"name"] containsObject:name]; +} + - (NSArray *)relationships { //OK Index: EORelationship.m =================================================================== --- EORelationship.m (revision 26465) +++ EORelationship.m (working copy) @@ -1178,7 +1178,7 @@ *p] userInfo: nil]; - if ([[self entity] anyAttributeNamed: name]) + if ([[self entity] _hasAnyAttributeNamed: name]) exc++; else if ([[self entity] anyRelationshipNamed: name]) exc++;