This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inner classes mapped with composite-id not saving into database in Hibernate mapping  RSS feed

Param Ramar
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to persist a jaxb object using hibernate into db. All the details in Notice & Document will go in one main table and Slip details will go into other table Below is the jaxb class.

My hbm mapping files:



When i call It is saving only the the primaryKeyNumber in Document table not saving other details in Notice & Slip details

Below is the query generated in log

SQL] - insert into Document_Table (primaryKeyNumber) values (?) Hibernate: insert into Document_Table (primaryKeyNumber) values (?)

Ideally the query should insert all values from Ticket,Document & Notice values and also should generate separate queries to insert Slip Details into Slip_Table like below

Hibernate: insert into Document_Table (primaryKeyNumber,event,eventType,transactionCode,transactionType ) values (?,?,?,?,?)

if I call , then document details are recorded in the table without any Notice & slip details

Please help me to find where I have gone wrong here.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!