2 Replies Latest reply on Feb 21, 2007 8:20 AM by Micho Edershvili

    @UniqueConstraint has no Effect in MQSQL

    Micho Edershvili Newbie

      Hi,

      I definde an entitybean with a uniqueConstraint like this

      @Table
      (name="usergroup",
       uniqueConstraints = {@UniqueConstraint(columnNames={"mandantID", "name"})}
      )
      public class BenutzerGruppe implements Serializable
      { private long mSid;
       private long mMandantID;
       private String mName;


      I cannot see any effect in the database and it is possible to insert entities which violates the constraint.

      I´m using MySQL 5.0.24a

      Do I have to do anything more than using the annotaion in the entitybeandefinition?