Fix for #158 - Add support for using setDistinct (by excluding id property from generated sql)