0 Replies Latest reply on Oct 1, 2007 2:46 PM by Madhav Inamti

    seam generate-entities error....

    Madhav Inamti Novice

      This scenario seems to create

      create table groups (
      group_id integer NOT NULL AUTO_INCREMENT,
      group_name VARCHAR(100) NOT NULL,
      group_desc VARCHAR(100),
      PRIMARY KEY(group_id));

      insert into groups (group_id, group_name) values(1, "admin");
      insert into groups (group_id, group_name) values(2, "others");

      create table user (
      user_id integer NOT NULL AUTO_INCREMENT,
      group_id NOT NULL DEFAULT 2,
      user_name VARCHAR(100),
      PRIMARY KEY(user_id),
      FOREIGN KEY (group_id) REFERENCES group(group_id) ON UPDATE CASCADE ON DELETE RESTRICT);

      I seem to get a

      Caused by org.hibernate.PropertyValueException with message: "not-null property references a null or transient value: com.foo.entity.User.groups"

      Thanks,

      M