0 Replies Latest reply on Mar 31, 2005 8:28 AM by Matteo Miraz

    Setting unique index constraints in a CMP Bean

    Matteo Miraz Newbie


      I'm using Jboss v.4.0.1sp1 with MySQL v.4.1 as application Server, Eclipse with jBossIDE
      I have to create a CMP bean with a integer autogenerated primary key and a constraint on some other fields.

      In particular, my table looks like
      ID, field1, field2, field3
      where ID is the autogenerated primary key
      and field1 and field2 have to be enclosed in the unique constraint.

      What can we do to let Jboss manage correctly this database without modifying it manually?