Hi All,
i have three DB tables
1. route(route_id) 2. stop(stop_id) 3. route_stop(route_id,stop_id)---mapping table
Route.hbm.xml
<set name="stops" table="route_stop" cascade="all"> <key column="route_id" /> <many-to-many column="stop_id" class="com.trackingsystem.model.Stop" /> </set>
Stop.hbm.xml
<set name="routes" table="route_stop" cascade="all"> <key column="stop_id" /> <many-to-many column="route_id" class="com.trackingsystem.model.Route" /> </set>
but data is not inserted in the DB,
it is showing these select queries
Hibernate: /* get current state com.trackingsystem.model.Stop */ select stop_.stop_id, stop_.stop_name as stop2_106_, stop_.lattitude as lattitude106_, stop_.langitude as langitude106_ from trackingsystem.stop stop_ where stop_.stop_id=?
where is the problem?
|