联合主键不会写,不过比如A表某列引用B表ID: @JoinColumn(name = "BID", referencedColumnName = "ID") @ManyToOne private B id;