From ojb-user Sat Mar 26 08:31:30 2005 From: Stefan Walkner Date: Sat, 26 Mar 2005 08:31:30 +0000 To: ojb-user Subject: Re: OJB - Inheritance - Class>Table Mapping Message-Id: <200503261513.34051.walkner.stefan () sbg ! at> X-MARC-Message: https://marc.info/?l=ojb-user&m=111182589023693 hello again, I could solve this problem by just rtfm: http://db.apache.org/ojb/docu/guides/advanced-technique.html#Mapping+Classes+on+Multiple+Joined+Tables But one problem I still can't figure out: when using broker.store(MyObject) with mapping to multiple tables I use a foreign key from table B to table A. When inserting I don't know the id (primary key in table A and foreign key in table B to table A). The record in table A gets a primary key (from mysql - autoincrement) but the fk_tableA (foreign key to table A) does NOT get the id. Is it possible to tell OJB that the last insert id should be used as foreign key for table B to table A? thanks in advance, stefan walkner --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org For additional commands, e-mail: ojb-user-help@db.apache.org