General discussion
October 12, 2010 at 11:48 PM
programmer12

inserting values into multiple tables using hibernate

by programmer12 . Updated 15 years, 10 months ago

hello everyone,

i have existing tables hotel and hotel_services.

hotel table contains:
hotel_id
hotel_name

hotel_services contains:
hotel_id
hotel_service_name

each hotel can offer several services, so in my form user could enter as many services as he wants at a time.
so for instance,
hotel name: HOTEL1
hotel_services:
1. hotel_service1
2. hotel_service2
3. hotel_service3

my question is how should i do it in hibernate in such a way that i’ll be able to insert all the data into their respective tables(which are hotels and hotel_services tables).

thanks for the help..

This discussion is locked

All Comments