在 Scala 编程中使用 Annotation @jointable 时出错
我导入这个
import javax.persistence.JoinTable
编码
@BeanProperty
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "LW_USER_ROLE", joinColumns = { @JoinColumn(name = "USERACCOUNT_ID") }, inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })
Here got the compilation error ---^ ^------ and here
var roles:List[Role]
编译错误
Multiple markers at this line
- expected start of definition
- annotation argument needs to be a constant; found: { <empty>; (){<error>} }
{<error>}
- type mismatch; found : Unit required: Array[javax.persistence.JoinColumn]
- expected start of definition
- annotation argument needs to be a constant; found: { <empty>; (){<error>} }
{<error>}
- type mismatch; found : Unit required: Array[javax.persistence.JoinColumn]
我在java中使用了这个注释,但没有错误..如果有人知道答案,请在这里分享。
关于米兰