tests for Model.fields
add distinct2sql