Goal
CREATE TEMPORARY TABLE
statement in Hibernate without using native SQL. That means using HQL or Hibernate APIs only.DROP
the temporary table when finished. (I know it's not necessary, but I think it's a good habit to do so.)Background
Save
, the values MUST be saved in a single transaction.SELECT
statements on the view.UPDATE
statements on the view, which calls the INSTEAD OF
trigger of the view.(I)
the value of a is 4
when the user displays the web form (II)
another user updates the same field to 5
(III)
the first user updates the field to 2
and submits the web form.Originally Proposed Solution
Solution Supposed to Work Better
Save
, create a temporary table (a temporary table is a table only seen by the current session / connection, and is dropped automatically when the session is closed / upon disconnection) and save the objects (cells) into the temporary table.Is there any ideas?
This does not answer your exact requirements but given that there have been no attempts at an answer... have you considered using a temporary CSV table using something like http://csvjdbc.sourceforge.net/.
While it does not conform to requirement of doing it through hibernate, it is database agnostic and cross platform.