Created
February 1, 2012 01:48
-
-
Save lmajano/1714462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" | |
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | |
<hibernate-mapping> | |
<subclass batch-size="25" discriminator-value="Page" | |
entity-name="cbPage" | |
extends="cfc:contentbox.model.content.BaseContent" lazy="true" name="cfc:contentbox.model.content.Page"> | |
<bag batch-size="25" cascade="all-delete-orphan" inverse="true" | |
lazy="extra" name="childPages" order-by="createdDate"> | |
<key column="FK_parentID"/> | |
<one-to-many class="cfc:contentbox.model.content.Page"/> | |
</bag> | |
<join table="cb_page"> | |
<key column="contentID"/> | |
<property name="layout" type="string"> | |
<column length="200" name="layout"/> | |
</property> | |
<property name="order" type="integer"> | |
<column default="0" name="`order`"/> | |
</property> | |
<property name="showInMenu" type="boolean"> | |
<column default="1" index="idx_showInMenu" | |
name="showInMenu" not-null="true"/> | |
</property> | |
<property | |
formula="(select count(*) from cb_page page where page.FK_parentID=contentID)" | |
name="numberOfChildren" type="string"/> | |
<many-to-one class="cfc:contentbox.model.content.Page" | |
column="FK_parentID" lazy="proxy" name="parent"/> | |
</join> | |
</subclass> | |
</hibernate-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment