@OneToOne
@JoinColumn(name = "message_fileinfo_id",referencedColumnName = "id",insertable = false,updatable = false)
@NotFound(action = NotFoundAction.IGNORE)
@OneToOne匹配时,若message_fileinfo_id匹配不到id,则会报错,此时加上@NotFound(action = NotFoundAction.IGNORE)
就不会报错了
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/289919.html