Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 MySQL 数据库,我想在其上使用 Eclipse 内置的 Dali JPA 工具生成实体。数据库不是我的,我更愿意不要求改变架构。
当我创建实体时存在问题,因为表具有映射到另一个表中不是主键的列的外键。我注意到由于这个原因,该表的实体不是由该工具创建的(但它是在persistence.xml添加的)。
有没有一种无需更改数据库架构即可生成实体的方法?
非常感谢每一个可能的想法。
PS:我不是数据库专家,但是可以创建映射到非主键列的外键吗?