more testing and multiple fixes to make queries on nested pojos work