[hibernate-issues] [Hibernate-JIRA] Reopened: (ANN-509) referencedColumnName of fk column causes MappingException

Emmanuel Bernard (JIRA) noreply at atlassian.com
Sat Jan 20 10:55:44 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-509?page=all ]
     
Emmanuel Bernard reopened ANN-509:
----------------------------------


"I too made the test case work after making the
changes, but my original production code (which did not have the bugs I
introduced when writing the test case) still did not work after going over
everything again.

The only thing I could think of was the order in which things were
happening.  I had checked everything else.

It turns out I made the test case fail again when the name of the class
corresponding to the right side of the association changed to be
alphabetically lower than the left side. 

This problem is very sensitive to the order in which classes are processed.
You should have a good test case now."
Matthew

> 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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list