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




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090380#4090380

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090380
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to