You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Rakesh Chauhan <ra...@cybage.com> on 2003/12/29 12:24:27 UTC

Saving a OM Object

Hi,
I have two tables which are linked by a Foreign Key relationship.
Table A is the Parent table and Table B is the child table.
Both are InnoDB tables.

To save data, I first populate the Table B object and then Add that Object
to Table A and then I call the save method on table A. This generally saves
data to both the tables.

But the problem is that sometimes the data of table A is saved and the data
for table B is not saved in the database though I get the ID of the record
in table B. Is there a way to ensure that nothing gets saved to the Database
if the child table fails to get saved.

Thanks,
/rakesh


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org