I have a sequence of 5 forms that an user has to fill up in my system. On each submitted form, I send the data to my java server and store this data on mySQL database using Hibernate.
In this scenario, I may have some problems for example if an user give up of filling the form without having finished all the form "steps", cause I'd have incompleted data from this specific user.
To solve this, I have thought in creating extras tables similar to the ones that I have now and add a new column userId, which would identify the user filling the form. Once the user complete to fill all the forms, I would send the data to the "official" table, which does not have the userId column. This table would be read by the system.
Is there a way to easily to it using Hibernate? Or would I have to manually create new tables with one extra column and, once all form are submitted, move the data from the temporary table, to the definitive table (without userId)?