ambiguous find

Project:Prolint Issue Tracker
Component:Rules
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Suppose there is a statement:

FIND something WHERE something.color = "red" NO-ERROR etc

but there is no unique key on the selected fields (color). The FIND statement will return nothing. Of course this can be intentional, but I think it is often a mistake.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

FIND can still return

FIND can still return something if there is only 1 instance of color red ...
I would probably flag this in all cases though if 'if ambiguous' is not specified following it (which I think is very hard to check with globally defined buffers) ... I'd rather say ' possible ambiguous find' message so that developer can take a second look, than skip it worrying that it will generate a false positive.