镁天PROJECT
程序员文章站
2022-07-15 11:52:28
...
@Column(unique = true)
private String name;
是无用的,因为http://*.com/questions/3496028/columnunique-true-does-not-seem-to-work
Any对象只能是单向的,One-to-Many不行。
@Entity(name = "brand")
这样的写法是错误的,会报错:org.hibernate.hql.ast.QuerySyntaxException: Brand is not mapped [from Brand]
正确的写法是:
@Entity
@Table(name = "brand")
private String name;
是无用的,因为http://*.com/questions/3496028/columnunique-true-does-not-seem-to-work
Any对象只能是单向的,One-to-Many不行。
@Entity(name = "brand")
这样的写法是错误的,会报错:org.hibernate.hql.ast.QuerySyntaxException: Brand is not mapped [from Brand]
正确的写法是:
@Entity
@Table(name = "brand")
上一篇: Maven使用 maven
下一篇: test weibo iteye