Developing a brand new schema/app which uses hibernate to create tables from pojo's.
My desire is to now migrate existing data from legacy db to new schema, which is a matter of creating approriate sql and populating my new pojo's.
Secondly, it is intended that this app will be used by others, migrating from different db schema's. My initial thinkign is to therefore put the relevant sql into xml files so they can be easily changed without altering the java.
For example my current system will select loginname from logintable
into pojo : User.setUsername()
and then do a hibernate save. And then I can simply change the sql at a later date makign sure it returns the correct data.
Does this sound sensible ? Is their existing functionality in hibernate for doing migrations/bulk inserts ? Or will I simply be calling this n times :
User user = new User();
session.save(user);