0

My task is to export a database via hibernate. The starting point is any entity in my model. The selected entity has to navigate through all its referenced objects and store it in my target model (which is the same as the source model). Do you have any idea to solve this task?

Jonas
  • 232
  • 3
  • 13

1 Answers1

0

Create a Hibernate project for the first database and one for the second database. Then create another project that has the other two projects as dependencies. In the third project you can reference the session of the hibernate instance for each respective database, performing the logic needed to move from one data model to the other.

Kevin Bowersox
  • 93,289
  • 19
  • 159
  • 189
  • do you have an idea for a generic solution? I have to pick any entity and resolve all referenced objects. Including reversed associations. – Jonas Apr 16 '13 at 09:30
  • I would just do that work manually in the third project. I don't think anything is going to automatically pull all of the relationships of a given hibernate entity. – Kevin Bowersox Apr 16 '13 at 09:33