views:

61

answers:

3

If one has three fields in a db that they are querying an object by.... One of these fields must always be an associations id. Concerning the other two fields "only one needs to be true"

What interpretation do you take or make of "only one needs to be true"?

+3  A: 

I'd read that as OR, only one needs to be true, but I won't object if the other is too.

If I meant EXCLUSIVE OR I would say "exactly one must be true".

However, the only way to be sure what was intended is to ask the author, who may well surprise you by telling you about yet a further condition ;-(

djna
very logical indeed
Sam
+1  A: 

I read this as meaning that the original search specified the condition that one field had to be assoc, plus 2 more conditions for the remaining two fields, but selection can be made if only one of these two (plus the assoc one) are true.

gnometorule
This is also what I take it to mean
Sam
+1  A: 

Well, I would read it as "one of the other two fields must match the search criterion". Beyond that, I would need more information.

George Edison
Thanks. I know its vague but its more about human logic than computer logic and such is such.
Sam