jjzjj

ObjectAttribute

全部标签

java - org.hibernate.AnnotationException : A Foreign key refering has the wrong number of column. 应该是 2

我有上面截图中的表格类的写法如下@EntitypublicclassObject{@Idprivateintid;privateStringname;@OneToMany(mappedBy="object",fetch=FetchType.LAZY)privateListattrubuteList;}@EntitypublicclassObjectAttribute{@Idprivateintid;@Id@ManyToOne@JoinColumn(name="objectId")privateObjectobject;privateStringname;}@Entitypubliccl