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

Sharath Reddy (JIRA) noreply at atlassian.com
Wed Jul 22 16:28:11 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sharath Reddy updated HBX-982:
------------------------------

    Attachment: Hbm2JavaEjb3Test.patch
                EntityPOJOClass.patch

> 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
>         Attachments: EntityPOJOClass.patch, Hbm2JavaEjb3Test.patch
>
>
> 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