My xsd ,as in attached file , report a relation ROOT 1–>1 Header but when I build project using the hyperjaxb3 it create a wrong @ManyToOne annotation than @OneToOne as the xsd have a default sequence constraint ( 1 ) :
Code created is :
@ManyToOne(targetEntity = HeaderType.class, cascade = {
CascadeType.ALL
})
@joincolumn(name = "HEADER_ROOT_HJID")
public HeaderType getHeader() {
Exerpt from XSD :