数据表没有主键也没有外键,但是有字段对应,就是没有生成主外键关联,用annotation能否在实体类中映射,能否像以往以对象的方式查询
------解决方案--------------------
- Java code
@Entity@Table(name="test_pp")public class CategoryProdPlace { @EmbeddedId @Column(name="pinming_idcode",length=32) private String categoryIdCode; @Column(name="chandi_id",length=32) private String prodPlaceId; //setter getter}