when i generate the mapping files and some of my attributes in the database are unique there is no unique=”true” attribute set in the mapping files. i think it works also without this flag, but whats the advantage of setting this optionally as menshioned in the hibernate docs?
the code looks like this:
<property name="serialNumber" unique="true" type="java.lang.String" column="SERIAL_NUMBER"/>
is it better than this:
<property name="serialNumber" type="java.lang.String" column="SERIAL_NUMBER"/>
if there the serialNumber is already set unique in the database itself?