emmanuel wrote:
The hibernate annotations unit test suite contains *a lot* of material, actually all the supported mappings
Ok, I try to find it.
In the meantime I tried:
Code:
@Column(name = "mainpic", unique = false, nullable = false, updatable = false)
@OneToOne(fetch=FetchType.EAGER)
@JoinColumn(name="uid")
@Where(clause="mainpic=1")
@NotFound(action=NotFoundAction.IGNORE)
public Picture getMainpicture() {
return this.mainpicture;
}
however this led to an org.hibernate.ObjectNotFoundException
No row with the given identifier exists: [User#147854]