Hi,
When I use Session.save(MyCustomObject).. Hibernate is internally issuing 3 insert statements as below.
Is there a way to tell hibernate to use single insert or batch insert so that it need not make 3 db hits..
I am hoping that, this should be possible by proper annotation to the custome object.
Regards,
Nagendra
Parameter:xmlRequest=<RegisterRequest name='rja' loginID='nag1' password='nag' e
mail='nag@nag.com'><Phone number='123213'/></RegisterRequest>
Hibernate:
/* criteria query */ select
this_.loginID as y0_
from
TBL_USERS this_
where
lower(this_.loginID) like ?
Hibernate:
/* insert com.tejasoft.dialer.model.bdo.User
*/ insert
into
TBL_USERS
(name, password, loginID, email, zip)
values
(?, ?, ?, ?, ?)
Hibernate:
/* insert com.tejasoft.dialer.model.bdo.Phone
*/ insert
into
TBL_PHONES
(number, country, countryCode)
values
(?, ?, ?)
Hibernate:
/* insert com.tejasoft.dialer.model.bdo.Relation
*/ insert
into
TBL_RELATIONS
(name, phone_pk, relation, tezzd, user_pk)
values
(?, ?, ?, ?, ?)
_________________ Raja Nagendra Kumar, C.T.O http://www.tejasoft.com TejaSoft - Specialists in Code Audit, Unit Testing and Merciless Re-factoring - Engineering Crisis Turnaround Experts
|