cache model.class.propertyKeys outside of loop

avoids calling the propertyKeys class method for each iteration
of the loop.