Yes this is possible, the difficulty is that with several of the databases when the 
foreign key column is created it is set to the same type as the primary key column 
which may not allow for null.  So you either have to specify the sql type to use which 
in the case of postgres I used INTEGER for the foreign key while the primary key is of 
type SERIAL.  The other option which I have not used if you want the foreign key to be 
non-null is to set the relation in the post create methods and then there is a flag 
you need that says to not save to the DB until after the post create.  I do not 
remember what the flag is becasue I have not used it but I have seen numerous postings 
that discuss its use.

Hope this helps,
Mark

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

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


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to