referencedColumnName is being ignored for OneToOne mapping
----------------------------------------------------------
Key: HSEARCH-1123
URL:
https://hibernate.onjira.com/browse/HSEARCH-1123
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 4.1.0.Final
Reporter: farhad ch
Priority: Critical
Using a soft key instead of FK is necessary for legacy DB's and currently 4.1.2 has
issues with this. I am using:
@OneToOne(fetch = FetchType.LAZY)
@NotFound(action = NotFoundAction.IGNORE)
@JoinColumns({
@JoinColumn(name = "id", referencedColumnName="houseId",
nullable = true, insertable = false, updatable = false)
})
public Child getChild(){
return this.child;
}
but SQL shows join is based on PK and not Soft Key "houseId"
@OneToOne mapping will force a FK-PK relationship and ignores values for
"referencedColumnName" attributes:
Inspecting code from AnnotationBinder and OneToOne shows few FIXME and TODO tags like:
//FIXME referencedColumnName ignored
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira