This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
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