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:
dwetzel 2010-04-20 06:14:21 +00:00
parent 61d02eac6d
commit ca59cbc920
2 changed files with 19 additions and 16 deletions

View file

@ -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>

View file

@ -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;
}