• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate Foreign Keys  RSS feed

Ally Cavs
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Here is my HBM files

I am using javax.persistence.Entitymanager

Heres the SQL hibernate executes

What is inserted into the DB is perfect. invoice_id on the Rate table is the actual id of the newly inserted parent vatInvoice.

but my vatInvoice instance has not updated the invoiceID attributes on its list of rates

But if I do a retrieve on the newly created vatInvoice then i get back the correct foreign key value

I believe this to be some sort of update="true" or something to that effect issue. But nothing i try works. I do not want to do a retrieve after every insert to force a refresh on foreign keys setters/getters. This was working but i cant track the change that stopped it working. Im not sure how long this has stopped working for me

Please help
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!