From 82d27b5e48a3a577557834d7ecaca51b0216ab62 Mon Sep 17 00:00:00 2001 From: Matt Rice Date: Sat, 3 May 2008 08:14:22 +0000 Subject: [PATCH] * EOAccess/EOEntity.m (-[isValidPrimaryKeyAttribute:], -[isValidAttributeUsedForLocking:], -[isValidClassProperty:]): Test object equality as well as name. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26484 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 +++++++- EOAccess/EOEntity.m | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3ce58a..6857c31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ +2008-05-03 Matt Rice + + * EOAccess/EOEntity.m (-[isValidPrimaryKeyAttribute:], + -[isValidAttributeUsedForLocking:], + -[isValidClassProperty:]): Test object equality as well as name. + 2008-05-01 David Ayers * EOAccess/EODatabaseContext.m ([-initializeObject:row:entity:editingContext:]): Remove debug logs. * EOAccess/EOEntity.m ([-_dictionaryForInstanceProperties], - [-primaryKeyForGlobalID:]) Remove debug logs. + [-primaryKeyForGlobalID:]): Remove debug logs. 2008-05-01 Matt Rice diff --git a/EOAccess/EOEntity.m b/EOAccess/EOEntity.m index 16af828..927ff90 100644 --- a/EOAccess/EOEntity.m +++ b/EOAccess/EOEntity.m @@ -1432,7 +1432,7 @@ static void performSelectorOnArrayWithEachObjectOfClass(NSArray *arr, SEL select - (BOOL)isValidAttributeUsedForLocking: (EOAttribute *)attribute { if (!([attribute isKindOfClass: GDL2_EOAttributeClass] - && [[self attributesByName] objectForKey: [attribute name]])) + && ([self attributeNamed: [attribute name]] == attribute))) return NO; if ([attribute isDerived]) @@ -1444,7 +1444,7 @@ static void performSelectorOnArrayWithEachObjectOfClass(NSArray *arr, SEL select - (BOOL)isValidPrimaryKeyAttribute: (EOAttribute *)attribute { if (!([attribute isKindOfClass: GDL2_EOAttributeClass] - && [[self attributesByName] objectForKey: [attribute name]])) + && ([self attributeNamed: [attribute name]] == attribute))) return NO; if ([attribute isDerived]) @@ -1496,8 +1496,8 @@ static void performSelectorOnArrayWithEachObjectOfClass(NSArray *arr, SEL select thePropertyName = [(EOAttribute *)property name]; - if ([[self attributesByName] objectForKey: thePropertyName] - || [[self relationshipsByName] objectForKey: thePropertyName]) + if ([[self attributesByName] objectForKey: thePropertyName] == property + || [[self relationshipsByName] objectForKey: thePropertyName] == property) return YES; return NO;