1

请帮助我维护两个以上表之间的关系。我将解释我现在面临的一种情况。表 1 包含我在应用程序中使用的所有代码,示例状态代码表示 Active 的代码为 10,InActive 的代码为 20,这样我维护所有代码,表 2 有 5 列,

column 1 is auto generated key
column 2 - has the id of table 1
column 3 - also has the id of table 1
column 4 - also has the id of table 1
column 5 - has description.

因此,我需要在从这两个表中检索数据时执行多个连接。我的问题是,维护表是否正确?

此外,我正在使用 Spring 和 Hibernate 从数据库中获取数据。关于如何使用 Hibernate 做到这一点的任何想法?请就此向我提出建议。

4

0 回答 0