From 329eccc59cf1b108fbe86dd693c4d768fb0a2126 Mon Sep 17 00:00:00 2001 From: David Ayers Date: Tue, 7 Sep 2004 15:57:21 +0000 Subject: [PATCH] * EOAccess/EOAttribute.h * EOAccess/EOAttribute.m (_parent, -[setParent:]): Do not retain backward reference. (-[setName:): Mark as editited if parent is an entity. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20022 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ EOAccess/EOAttribute.h | 2 +- EOAccess/EOAttribute.m | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bca1035..3016a09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-09-07 David Ayers + + * EOAccess/EOAttribute.h + * EOAccess/EOAttribute.m (_parent, -[setParent:]): Do not retain + backward reference. + (-[setName:): Mark as editited if parent is an entity. + 2004-06-23 David Ayers * EOAccess/EOAccessFault.m: Include privat headers locally. diff --git a/EOAccess/EOAttribute.h b/EOAccess/EOAttribute.h index 1390bf6..f9811cb 100644 --- a/EOAccess/EOAttribute.h +++ b/EOAccess/EOAttribute.h @@ -108,7 +108,7 @@ typedef enum { /* Garbage collectable objects */ // EOEntity *_entity; // GCMutableArray *_definitionArray; // These variables are meaningful only - id _parent; + id _parent; /* unretained */ EOAttribute *_prototype; EOExpressionArray *_definitionArray; EOAttribute *_realAttribute; // if the attribute is flattened //Not in EOF ! diff --git a/EOAccess/EOAttribute.m b/EOAccess/EOAttribute.m index a69d766..2018d1b 100644 --- a/EOAccess/EOAttribute.m +++ b/EOAccess/EOAttribute.m @@ -777,6 +777,11 @@ static Class NSCalendarDateClass; [[self validateName: name] raise]; ASSIGN(_name, name); + if (_flags.isParentAnEOEntity) + { + [_parent _setIsEdited]; + } + } - (void)setPrototype: (EOAttribute *)prototype @@ -1473,7 +1478,7 @@ return nexexp { //OK [self willChange]; - ASSIGN(_parent, parent);//TODO assign ?? + _parent = parent; _flags.isParentAnEOEntity = [_parent isKindOfClass: [EOEntity class]];//?? }