Added support for unique fields on databsae