I am making some project on Java…. I need to save a huge amount of data into different tables… but all in one submit, so, for make it easy to control I created a dto and I defined my object… until here is great, now I want to save it I was wondering if I can serialize it and save it, or in some way save it on my database (using a new table) and save the object as itself (instead create fields for every attribute and save each one), and then, get all the object back and be able to use all the info.
there is any way? I was searching about save serialized objects and the get them back, any idea if this is the way?
p.d. I am using JPA and spring
You mean like this?
http://javapapers.com/core-java/serialize-de-serialize-java-object-from-database/
otherwise use some of the Object-Relational mechanisms:
http://www.hibernate.org
http://blog.mybatis.org