I have two tables login and buyer. PK(Primary Key) of login table is FK(Foreign Key) in buyer table.Below is the table schema. Login -id (PK) -other columns Buyer -id (PK) -loginid (FK) -other columns
I am using Spring and Hibernate.What I want to know that as this two tables are related with each other, is it possible to persist them in one DB query. Like I prepare both the tables and then I will persist only Login table so that the Buyer table will also be persisted.
I have extended HibernateDaoSupport class and I am using SaveorUpdate() method of Hibernate Session.
PS:- I have tried doing that but I am able to persist only Login. I have done similar things in EJB3 successfully. I have persisted 5 tables at one shot. [ December 14, 2008: Message edited by: Vishal Pandya ]