fix bugs in DynamicQuery, add where-in