mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-21 02:20:55 +00:00
* EOAccess/EOEntity.m (-[setName:]): Skip the uniqueing if the
name is the same. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20152 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
697a6f33bf
commit
ffb14dffe8
2 changed files with 17 additions and 7 deletions
|
@ -18,6 +18,9 @@
|
|||
(-[EOObserverProxy initWithTarget:action:priority:]): Implement.
|
||||
(-[EOObserverProxy dealloc],-[EOObserverProxy priority])
|
||||
(-[EOObserverProxy subjectChanged]): Ditto.
|
||||
|
||||
* EOAccess/EOEntity.m (-[setName:]): Skip the uniqueing if the
|
||||
name is the same.
|
||||
|
||||
2004-09-25 David Ayers <d.ayers@inode.at>
|
||||
|
||||
|
|
|
@ -1874,14 +1874,21 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
|
||||
- (void)setName: (NSString *)name
|
||||
{
|
||||
if ([_model entityNamed: name])
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"%@ -- %@ 0x%x: \"%@\" already used in the model",
|
||||
NSStringFromSelector(_cmd),
|
||||
NSStringFromClass([self class]),
|
||||
self,
|
||||
name];
|
||||
if (name && [name isEqual: _name]) return;
|
||||
|
||||
if (name
|
||||
&& [name isEqual: _name] == NO
|
||||
&& [_model entityNamed: name] != nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"%@ -- %@ 0x%x: \"%@\" already used in the model",
|
||||
NSStringFromSelector(_cmd),
|
||||
NSStringFromClass([self class]),
|
||||
self,
|
||||
name];
|
||||
}
|
||||
|
||||
[self willChange];
|
||||
ASSIGNCOPY(_name, name);
|
||||
[_model _updateCache];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue