I did another test. When I changed the query to use a JP-QL rather than native mongo query, it works.