mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-20 18:12:04 +00:00
* 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:
parent
f9d210a522
commit
a7f90ca359
3 changed files with 14 additions and 7 deletions
|
@ -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>
|
2006-10-01 Matt Rice <ratmice@yahoo.com>
|
||||||
|
|
||||||
* EOAdaptors/SQLiteAdaptor/: Initial import of SQLite3 adaptor.
|
* EOAdaptors/SQLiteAdaptor/: Initial import of SQLite3 adaptor.
|
||||||
|
|
|
@ -2337,13 +2337,14 @@ createInstanceWithEditingContext:globalID:zone:
|
||||||
[self willChange];
|
[self willChange];
|
||||||
[_subEntities addObject: child];
|
[_subEntities addObject: child];
|
||||||
[[child parentEntity] removeSubEntity:self];
|
[[child parentEntity] removeSubEntity:self];
|
||||||
[child setParentEntity: self];
|
[child _setParentEntity: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)removeSubEntity: (EOEntity *)child
|
- (void)removeSubEntity: (EOEntity *)child
|
||||||
{
|
{
|
||||||
[self willChange];
|
[self willChange];
|
||||||
[child setParentEntity: nil];
|
if ([child parentEntity] == self)
|
||||||
|
[child _setParentEntity: nil];
|
||||||
[_subEntities removeObject: child];
|
[_subEntities removeObject: child];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2697,10 +2698,8 @@ createInstanceWithEditingContext:globalID:zone:
|
||||||
_model = model;
|
_model = model;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO this method should probably be private.
|
/* only for private usage of -addSubEntity: and -removeSubEntity: */
|
||||||
it doesn't tell the parent we are a subEntity and since
|
- (void)_setParentEntity: (EOEntity *)parent
|
||||||
-addSubEntity: calls it doing so would cause a recursive loop */
|
|
||||||
- (void)setParentEntity: (EOEntity *)parent
|
|
||||||
{
|
{
|
||||||
[self willChange]; // TODO: verify
|
[self willChange]; // TODO: verify
|
||||||
ASSIGN(_parent, parent);
|
ASSIGN(_parent, parent);
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
- (BOOL)createsMutableObjects;
|
- (BOOL)createsMutableObjects;
|
||||||
|
|
||||||
- (void)_setModel: (EOModel *)model;
|
- (void)_setModel: (EOModel *)model;
|
||||||
- (void)setParentEntity: (EOEntity *)parent;
|
- (void)_setParentEntity: (EOEntity *)parent;
|
||||||
|
|
||||||
-(Class)_classForInstances;
|
-(Class)_classForInstances;
|
||||||
- (void)_setInternalInfo: (NSDictionary *)dictionary;
|
- (void)_setInternalInfo: (NSDictionary *)dictionary;
|
||||||
|
|
Loading…
Reference in a new issue