[hibernate-issues] [Hibernate-JIRA] Created: (HBX-982) HBM2JAVA w/ ejb3=true does not generate @IndexColumn annotation

Parker Whirlow (JIRA) noreply at atlassian.com
Thu Aug 23 19:20:57 EDT 2007


HBM2JAVA w/ ejb3=true does not generate @IndexColumn annotation
---------------------------------------------------------------

                 Key: HBX-982
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-982
             Project: Hibernate Tools
          Issue Type: Bug
          Components: hbm2java
    Affects Versions: 3.2beta10
         Environment: HibernateTools 3.2beta10
            Reporter: Parker Whirlow



When using the HBM2JAVA tool with 'ejb3=true' to generate EJB annotations, a hibernate mapping consisting of an ordered List doesn't generate the @IndexColumn annotation in the resulting java class. See below:

Mapping document:
<hibernate-mapping package="com.company.ejb3.entity">
  <union-subclass name="Person" table="person" extends="AbstractEntity">
  	<property name="firstName" column="first_name" not-null="true" type="string" length="150"></property>
  	<list name="addresses" table="person_addresses">
  		<key column="person" />
  		<list-index column="address_index" />
  		<many-to-many column="address" class="Address" />
  	</list>
  </union-subclass>
</hibernate-mapping>


Resulting Person.java snippet:

@ManyToMany(fetch=FetchType.LAZY)
    @JoinTable(name="person_addresses", joinColumns = { 
        @JoinColumn(name="person", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="address", nullable=false, updatable=false) })
    public List<Address> getAddresses() {
        return this.addresses;
    }
    
    public void setAddresses(List<Address> addresses) {
        this.addresses = addresses;
    }


The above should contain:
@IndexColumn(name="address_index")


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