Project

General

Profile

Actions

Bug #4225

closed

Provenance - start auto-incremented IDs at 1 not 0

Added by ben leinfelder over 15 years ago. Updated over 15 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
provenance
Target version:
Start date:
07/06/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4225

Description

I inadvertently noticed that when I queried for the last execution of a workflow that never ran I was still getting back a valid execution id (namely 0).
The method description for resultSet.getInt(int) says that if if receives a SQL null it will return 0. This is happening in provenance. I think the best solution would be to start the IDs at 1 so as to never have ambiguity about whether there is actually a result or not. The alternative is to add this to any code that might encounter ids with value=0:

Object obj = result.getObject(1);
if (obj == null) {
return -1;
}
return result.getInt(1);


Related issues

Blocked by Kepler - Bug #4227: Provenance - use Integer return type in Queryable interfaceResolvedDaniel Crawl07/07/2009

Actions
Actions

Also available in: Atom PDF