[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-884) SchemaExport does not propagate parent indexes to <union-subclass> tables
Steve Ebersole (JIRA)
noreply at atlassian.com
Mon Mar 21 13:00:36 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-884.
------------------------------
Closing stale resolved issues
> SchemaExport does not propagate parent indexes to <union-subclass> tables
> -------------------------------------------------------------------------
>
> Key: HHH-884
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-884
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.3
> Reporter: Keith D Gregory
> Assignee: Gavin King
> Fix For: 3.1 rc 1
>
> Attachments: Cat.hbm.xml, Cat.java, PolydactylCat.hbm.xml, PolydactylCat.java, propagateConstraints.diff, propagateIndexesToUnionSubclasses.diff, Test.java
>
>
> When using <union-subclass>, you want to propagate parent table indexes to child tables to improve query speeds. For example, this HBM (a cut-n-paste of the separate files I'm attaching, so may have errors) should index cats by name in both the CAT and POLYDACTYL_CAT tables.
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping>
> <class name="example.Cat" table="CAT">
> <id name="id" type="string" unsaved-value="null" >
> <column name="CAT_ID" sql-type="char(32)" not-null="true"/>
> <generator class="uuid.hex"/>
> </id>
> <!-- index this so we can look for cats by name -->
> <property name="name">
> <column name="NAME" length="16" not-null="true" index="IDX_NAME"/>
> </property>
> <union-subclass name="example.PolydactylCat" table="POLYDACTYL_CAT">
> <property name="leftFront"/>
> <property name="rightFront"/>
> <property name="leftRear"/>
> <property name="rightRear"/>
> </union-subclass>
> </class>
> </hibernate-mapping>
> However, with versions up to 3.0.3, this only creates the index on the CAT table.
--
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