mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
globalIDForRow: isFinal: - create EOKeyGlobalID ouside loop
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@30201 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
61d02eac6d
commit
ca59cbc920
2 changed files with 19 additions and 16 deletions
|
@ -3,6 +3,9 @@
|
|||
start transaction in
|
||||
objectsWithFetchSpecification: editingContext:
|
||||
if none was in place before.
|
||||
|
||||
* EOAccess/EOEntity.m:
|
||||
globalIDForRow: isFinal: - create EOKeyGlobalID ouside loop
|
||||
|
||||
2010-04-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
|
|
|
@ -2296,9 +2296,9 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
EOKeyGlobalID *globalID = nil;
|
||||
NSArray *primaryKeyAttributeNames = nil;
|
||||
int count = 0;
|
||||
|
||||
|
||||
NSAssert([row count] > 0, @"Empty Row.");
|
||||
|
||||
|
||||
primaryKeyAttributeNames = [self primaryKeyAttributeNames];
|
||||
count = [primaryKeyAttributeNames count];
|
||||
{
|
||||
|
@ -2306,25 +2306,25 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
int i;
|
||||
IMP rowOFK=NULL;
|
||||
IMP pkanOAI=NULL;
|
||||
|
||||
|
||||
memset(keyArray, 0, sizeof(id) * count);
|
||||
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
keyArray[i] = GDL2_ObjectForKeyWithImpPtr(row,&rowOFK,
|
||||
GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,
|
||||
{
|
||||
keyArray[i] = GDL2_ObjectForKeyWithImpPtr(row,&rowOFK,
|
||||
GDL2_ObjectAtIndexWithImpPtr(primaryKeyAttributeNames,
|
||||
&pkanOAI,i));
|
||||
|
||||
globalID = [EOKeyGlobalID globalIDWithEntityName: [self name]
|
||||
keys: keyArray
|
||||
keyCount: count
|
||||
zone: [self zone]];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
globalID = [EOKeyGlobalID globalIDWithEntityName: [self name]
|
||||
keys: keyArray
|
||||
keyCount: count
|
||||
zone: [self zone]];
|
||||
}
|
||||
|
||||
//NSEmitTODO(); //TODO
|
||||
//TODO isFinal ??
|
||||
|
||||
|
||||
return globalID;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue