问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/11346484/hibernate-reverse-engineering-on-a-denormalized-database