[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-436) @IndexColumn does not work with discriminator-inheritance on the target entity of the list

ron piterman (JIRA) noreply at atlassian.com
Fri Sep 8 11:37:25 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-436?page=comments#action_24386 ] 

ron piterman commented on ANN-436:
----------------------------------

also, an ID with a generator should be added to the AbstractProperty class.

> @IndexColumn does not work with discriminator-inheritance on the target entity of the list
> ------------------------------------------------------------------------------------------
>
>          Key: ANN-436
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-436
>      Project: Hibernate Annotations
>         Type: Bug

>     Versions: 3.2.0.cr1
>     Reporter: ron piterman

>
>
> When using inheritance on the target entity of a List, @IndexColumn annotation does not work. Hibernate does not populate the index column value on the target entites. As a result, the sort_order column is null.
> @Entity
> public class PropertyOwner {
>   @OneToMany
>   @IndexColumn(name="sort_order", mappedBy="owner",cascade=CascadeType.ALL)
>   private List<AbstractProperty> properties;
> ... 
> }
>   
> @Entity
> @DiscriminatorColumn(name="property_type",discriminatorType=DiscriminatorType.STRING)
> public abstract class AbstractProperty {
>   @ManyToOne
>   private PropertyOwner owner;
> }
> @Entity
> @DiscriminatorValue("integer")
> public class IntegerProperty extends AbstractProperty {
>   
>   int integerValue;
>   ...
> }
> @Entity
> @DiscriminatorValue("string")
> public class IntegerProperty extends AbstractProperty {
>   
>   String stringValue
>   ...
> }

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