[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1166) hbm2dll: Foreign key creation on wrong attribute with conflicting name

Marc Schipperheyn (JIRA) noreply at atlassian.com
Tue Aug 3 08:12:40 EDT 2010


hbm2dll: Foreign key creation on wrong attribute with conflicting name
----------------------------------------------------------------------

                 Key: HBX-1166
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1166
             Project: Hibernate Tools
          Issue Type: Bug
            Reporter: Marc Schipperheyn
            Priority: Minor


I have the following classes:

Message
private int rating;
private VendorRating vendorRating;

Rating

VendorRating extends Rating

When I run hbm2dll through maven (hibernate-core 3.5.3,hibernate tools 3.3.2.beta1)

It generates the following sql which produces an error
alter table Message add index FK9C2397E764B5E0C (rating), add constraint FK9C2397E764B5E0C foreign key (rating) references Rating (ratingId);

What apparently happens is that it confuses the rating property of Message with the Rating class which is a parent of VendorRating.

-- 
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