[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-509?page=co...
]
Matthew D. Frederes commented on ANN-509:
-----------------------------------------
Please reopen this issue. In simplifying my production code I did create a few new bugs,
which you correctly pointed out. However they did not change the core issue here. I have
also found out more about this issue. If the class on the right side of the association
is named alphabetically lower than the class on the left, the error happens. Naming it
higher resolves the problem. Looks like we need a first pass over all classes before
trying to pair up a relationship of this type.
referencedColumnName of fk column causes MappingException
---------------------------------------------------------
Key: ANN-509
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-509
Project: Hibernate Annotations
Type: Bug
Components: binder
Versions: 3.2.0.ga
Environment: Hibernate 3.2.0.GA inside JBoss EJB install
Reporter: Matthew D. Frederes
Attachments: jiratest.ejb3, jiratest.ejb3
See attached test ejb3 file.
Using a referencedColumnName of fk column causes MappingException:
org.hibernate.MappingException: Unable to find column with logical name: vendor_id in
org.hibernate.mapping.Table(ItemCost) and its related supertables and secondary tables
@ManyToOne
@JoinColumns({
@JoinColumn(name="vendor", referencedColumnName="vendor_id",
insertable=false, updatable=false),
@JoinColumn(name="item", referencedColumnName="item_id",
insertable=false, updatable=false)
})
public ItemCost getDefaultCost() {
return defaultCost;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira