• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate 1 Class - 2 Tables

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys

I am using the hibernate xml mapping files to map object to a DB table. I have a invoice class along with its xml mapping file. The invoice class maps to invoice table

But now I need to map to a second table. the reason is for authorization. So users would create an invoice. But instead of been created on the invoice table. I want the information persisted to a pre authorised invoice table.
Then a manager reviews invoices, authorises upon which the invoice is copied over to the invoice table for further processing and removed from the pre authorised table.

The only solutions i see is using joins but this essentially maps different attributes of the invoice object to different tables. These 2 tables need to be identical. There are reasons to why i simply cant add an additional field called authorize. I need the 2 tables

Thanks
Alan
 
There's a city wid manhunt for this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic