avoid deprecated managedQuery call