-
1. Re: Is it possible to do relations on generated/unknown prim
millerm1 Sep 24, 2004 5:07 PM (in response to stud)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 -
2. Re: Is it possible to do relations on generated/unknown prim
stud Sep 24, 2004 5:30 PM (in response to stud)Great that it's possible, however I always got deployment exceptions about nonexistent fields...
Perhaps you can have a look at my earlier post and give me a hint on what I have done wrong.
http://jboss.org/index.html?module=bb&op=viewtopic&t=54267
Thanks,
stud