use tableQuery instead of queryTable