replace old appframework findall query