BTW, I see the TODO now.
Thinking about this some more, I think the TODO is more than just a nice
too have. I think it is absolutely needed. The actual use-case (from
which the JIRA test was distilled) uses property generation
(@org.hibernate.annotations.Generated). If I understand correctly
Ideally a isSynthetic() check is best. It's what I considered first.
However I tend to stay away from changing these mapping classes as
historically I have sometimes screwed up Max and other mapping package
consumers in ways I totally did not expect.
Max, do you see any potential issue with th
Your reading is correct.
We create a synthetic property that we use to populate the *-to-one
property-ref element.
The reason behind it is that JPA is more flexible than Core and allow to
reference columns instead of properties. This could lead to reference columns
coming from different properti
Little more info. The generated property is coming from
BinderHelper.createSyntheticPropertyReference as called from
org.hibernate.cfg.ToOneFkSecondPass#doSecondPass
The mappings in question here are:
public class Company {
@Id
@Column(name = "entity_id")
@GeneratedValue(strateg