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.
假设我有两个实体:
@Entity public class A { @Basic public UUID getBId(); } @Entity public class B { @Id public UUID getId(); }
实体 A 将 bId 保存在表 A 的列之一中。我想让hibernate生成外键约束(从A到B),但我真的不想明确关系(实体B以这种方式链接到大量实体,其中大部分很少使用,我非常希望避免开销)