Please take a look at the SQL created; it works but seems partly redundant:
Code:
[DEBUG,SQL] /* load org.hibernate.test.annotations.onetoone.referencedcolumnname.H */ select
h0_.id as id0_2_,
h0_.objId as objId0_2_,
h0_.value as value0_2_,
hi1_.id as id1_0_,
hi1_.objIdH as objIdH1_0_,
h2_.id as id0_1_,
h2_.objId as objId0_1_,
h2_.value as value0_1_
from
H h0_
left outer join
HI hi1_
on h0_.objId=hi1_.objIdH
left outer join
H h2_
on hi1_.objIdH=h2_.objId
where
h0_.objId=?
annotated H-Pojo:
http://paste.org/pastebin/view/18210annotated HI-Pojo:
http://paste.org/pastebin/view/18211Testcase:
http://paste.org/pastebin/view/18213