[jboss-user] [JBoss Seam] - seam gen issue

minamti do-not-reply at jboss.com
Mon Sep 24 22:36:51 EDT 2007


I get an error from seam generate-entities for the following situations.

table locale

locale_id integer NOT NULL, 
locale_name varchar(10) NOT NULL, 
locale_desc varchar(50) NOT NULL, 
PRIMARY KEY(locale_id)

table user 

user_id integer NOT NULL, 
locale_id integer NOT NULL, 
.....
PRIMARY KEY(user_id, locale_id)
FOREIGN KEY(locale_id) REFERENCES locale(locale_id) ON DELETE RESTRICT

table foo

foo_id integer NOT NULL,
locale_id integer NOT NULL,
foo_user1 integer NOT NULL, 
foo_user2 integer NOT NULL, 
...
PRIMARY KEY(foo_id, locale_id)
FOREIGN KEY(locale_id) REFERENCES locale(locale_id) ON DELETE RESTRICT
FOREIGN KEY(foo_user1) REFERENCES user(user_id) ON DELETE RESTRICT
FOREIGN KEY(foo_user2) REFERENCES user(user_id) ON DELETE RESTRICT


FooHome will have two UserHome declarations and a compiler error results. 

I see this error.

org.hibernate.AnnotationException: A Foreign key refering User from Foo has the wrong number of colum. should be 2.

Thanks, 

M








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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088234



More information about the jboss-user mailing list