[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ojb-user
Subject:    Re: OJB - Inheritance - Class>Table Mapping
From:       Stefan Walkner <walkner.stefan () sbg ! at>
Date:       2005-03-26 8:31:30
Message-ID: 200503261513.34051.walkner.stefan () sbg ! at
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic