hibernate在反规范化数据库上进行逆向工程 [英] hibernate reverse engineering on a denormalized database

查看:124
本文介绍了hibernate在反规范化数据库上进行逆向工程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在非规范化数据库上使用逆向工程? hibernate逆向工程为数据库中的所有表生成Pojo类似乎没有工作,因为没有任何表在其中有任何主键或外键。这是什么解决方案?

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?

我使用Netbeans&错误是不能生成Pojo类,因为表没有主键。

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

推荐答案

创建主键/数据库使用该工具。也许在原始数据库的克隆中。除此之外,你只能自己写映射。

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.

这篇关于hibernate在反规范化数据库上进行逆向工程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆