* EOAccess/EOEntityPriv.h: Rename setParentEntity: to

_setParentEntity:.
        * EOAccess/EOEntity.m (-addSubEntity:): Ditto.
        (-removeSubEntity:): Ditto, and check that self is the parent before
        setting to nil.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23707 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Matt Rice 2006-10-02 07:29:29 +00:00
parent f9d210a522
commit a7f90ca359
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2006-10-02 Matt Rice <ratmice@yahoo.com>
* EOAccess/EOEntityPriv.h: Rename setParentEntity: to
_setParentEntity:.
* EOAccess/EOEntity.m (-addSubEntity:): Ditto.
(-removeSubEntity:): Ditto, and check that self is the parent before
setting to nil.
2006-10-01 Matt Rice <ratmice@yahoo.com>
* EOAdaptors/SQLiteAdaptor/: Initial import of SQLite3 adaptor.

View file

@ -2337,13 +2337,14 @@ createInstanceWithEditingContext:globalID:zone:
[self willChange];
[_subEntities addObject: child];
[[child parentEntity] removeSubEntity:self];
[child setParentEntity: self];
[child _setParentEntity: self];
}
- (void)removeSubEntity: (EOEntity *)child
{
[self willChange];
[child setParentEntity: nil];
if ([child parentEntity] == self)
[child _setParentEntity: nil];
[_subEntities removeObject: child];
}
@ -2697,10 +2698,8 @@ createInstanceWithEditingContext:globalID:zone:
_model = model;
}
/* TODO this method should probably be private.
it doesn't tell the parent we are a subEntity and since
-addSubEntity: calls it doing so would cause a recursive loop */
- (void)setParentEntity: (EOEntity *)parent
/* only for private usage of -addSubEntity: and -removeSubEntity: */
- (void)_setParentEntity: (EOEntity *)parent
{
[self willChange]; // TODO: verify
ASSIGN(_parent, parent);

View file

@ -43,7 +43,7 @@
- (BOOL)createsMutableObjects;
- (void)_setModel: (EOModel *)model;
- (void)setParentEntity: (EOEntity *)parent;
- (void)_setParentEntity: (EOEntity *)parent;
-(Class)_classForInstances;
- (void)_setInternalInfo: (NSDictionary *)dictionary;