0 Replies Latest reply on Aug 14, 2003 7:40 AM by dzerzhinsky

    Why many WHERE clauses while findAll()

    dzerzhinsky Newbie

      Hi!
      Maybe it's not a problem at all but I wonder why JBoss performs 2 SQL statement for such simple query as findAll.
      SELECT id FROM table;
      SELECT id, field1, field2 FROM table WHERE (id=1) OR (id=2) OR (id=3) ... and so on.
      I think it would be more efficient to execute only one query SELECT * FROM table.
      Is it can be changed or I must be quiet about this.

      Thank you. Oleg