• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

insert followed by an update with CompositeUserType

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I observed that on using CompositeUserType,
when I save an object which contains the property defined by CompositeUserType, the SQLs generated are an insert statement
followed by an update statement with only the fields in CompositeUserType.

My application is very sensitive to the SQLs generated
as there are triggers on update statements and
this results in a pseudo update in my audit tables .

Is this a bug with hibernate or is it the expected behaviour ?


Hibernate version:
3.2.1
Mapping documents:


A.class





DB script


Name and version of the database you are using: HSQLDB
The generated SQL (show_sql=true):

insert into A (a1, a2, A3, A4, A5, id) values ('1', '2', '', '', '', 3)
update A set A3='6', A4='7', A5='8' where id=3
[ May 18, 2007: Message edited by: Lakshmi Dasari ]
 
Bras cause cancer. And tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic