Search code examples
databasespringhibernatejdbcpojo

hibernate reverse engineering on a denormalized database


is it possible to use reverse engineering on a denormalized database? hibernate reverse engineering to generate the Pojo classes for all the tables in the database didnt seem to work because none of the tables have any primary keys or foreign keys in them. what is the solution to this?

i did it using Netbeans & the error was that Pojo classes cant be generated because the tables do not have primary keys.


Solution

  • create the primary/foreign keys in the database befor using the tool. Maybe in a clone of the original database. Other than that you can only write the mapping yourself.