[OGo-Developer] Paranoid check in DirectAction+Resource?
Adam Tauno Williams
developer@opengroupware.org
Mon, 02 Oct 2006 10:17:39 -0400
I noticed in DirectAction
+Resource.m/_dictionaryForResourceEOGenericRecord this bit of code:
--------------------------------------
results = [ctx runCommand:@"appointmentresource::get-by-globalid",
@"gid", gid,
nil];
if ((rLength = [results count]) == 0) {
[self logWithFormat:@"No result found, but global ID is valid"];
return nil;
}
if (rLength >= 2) {
[self logWithFormat:@"Too many results for one global ID found"];
return nil;
}
--------------------------------------
Is the "rLength >= 2" check generally necessary? I thought that a
request by gid would return one object or none? In what circumstances
can a request by gid return two or more objects? (I get the difference
between using the key "gid" and "gids").