Hello,

I have the following tables: 

Student - PK is student_id
Course -PK is course_id
Student_Course - PK is student_id and course_id

I needed some additional fields in the association table, so I created an entity bean 
for Student_Course with student_id and course_id as CMR fields.

As far as I know, PK is set in ejbCreate and CMR is set in ejbPostCreate. In this 
case, the PKs are also CMR fields...so how do I set them?

I can't think of a way to set it in ejbCreate. I did try setting it in ejbPostCreate 
but I got the NULL Primary Key exception, as expected. I don't want to have to create 
a separate PK field in the association table.

Many thanks.

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

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


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to