Invalid Where Clauses

All queries that include at least some searchable criteria are evaluated, even if some parts of the where clause is invalid or incomplete.

Queries that include some invalid items in a where clauses will issue warnings when:

  • The where clause has a relational term in which both sides are constants.
  • A conjunct or disjunct or unary negation has only a constant term.
  • The entire where clause is just a constant.

(A constant term is one that is not a select clause, thus does not vary from object to object.)

A message is also output to warn about these situations in those cases where the expression might be indexed (made part of the SQL query to get candidate objects):

  • The keywords fromset and toset used without a set name.
  • The keywords from, to, and relationship used with a name that should be the name of a relationship type, but it is not.
  • The keyword attribute used with a name that should be the name of an attribute type, but it is not.

If you receive such a warning, you should cancel the query evaluation and correct the problem.