Hibernate: Conditional One To One mapping
===

I am saving a XML to database with the help of JAXB and Hibernate. There are two elements at the same level

    <ElementA id="111-aa>
     <childern/>
    </ElementA>

    <Relation refId=111-aa">
     <childern/>
    </Relation>

Here if `ElementA/@id==Relation/@refId` only then I have to save ElementA's PK to Relation table's ElementA_FK column.

Does Hibernate provide one-to-one mapping based on a condition?