partly support n+1 sql condition.