Re: Vertical inheritance

From: Julia Filho (jfilho..ahoo.com)
Date: Thu Aug 26 2010 - 14:11:04 UTC

  • Next message: Julia Filho: "Re: Vertical inheritance"

    Hi,

    Please disregard my previous post - those mappings were from the wrong
    mapping file. These are the mappings I am using:

            <db-entity name="DATA_COLLECTION" schema="ESDM">
                    <db-attribute name="ACTIVE_IND" type="CHAR" isMandatory="true"
    length="1"/>
                    <db-attribute name="AUTO_CLOSE_DATE" type="TIMESTAMP" length="7"/>
                    <db-attribute name="AUTO_OPEN_DATE" type="TIMESTAMP" length="7"/>
                    <db-attribute name="COLLECTION_NAME" type="VARCHAR" isMandatory="true"
    length="255"/>
                    <db-attribute name="COLLECTION_TYPE_ID" type="INTEGER" isMandatory="true"
    length="22"/>
                    <db-attribute name="DATA_COLLECTION_ID" type="INTEGER" isPrimaryKey="true"
    isMandatory="true" length="22"/>
                    <db-attribute name="DESCRIPTION" type="VARCHAR" isMandatory="true"
    length="255"/>
                    <db-attribute name="LAST_MODIFIED_BY" type="VARCHAR" isMandatory="true"
    length="20"/>
                    <db-attribute name="LAST_MODIFIED_TIME" type="TIMESTAMP"
    isMandatory="true" length="11"/>
                    <db-attribute name="SCHOOL_YEAR" type="TIMESTAMP" length="7"/>
                    <db-attribute name="SNAPSHOT_DATE" type="TIMESTAMP" length="7"/>
                    <db-attribute name="SUPT_APPROVAL_REQD" type="CHAR" isMandatory="true"
    length="1"/>
            </db-entity>

            <db-entity name="K12_DATA_COLLECTION" schema="ESDM">
                    <db-attribute name="DATA_COLLECTION_ID" type="INTEGER" isPrimaryKey="true"
    isMandatory="true" length="22"/>
                    <db-attribute name="SCHOOL_YEAR" type="TIMESTAMP" isMandatory="true"
    length="7"/>
                    <db-attribute name="SNAPSHOT_DATE" type="TIMESTAMP" isMandatory="true"
    length="7"/>
            </db-entity>

            <db-entity name="DATA_COLLECTION_TYPE" schema="ESDM">
                    <db-attribute name="COLLECTION_TYPE_DESC" type="VARCHAR" length="255"/>
                    <db-attribute name="COLLECTION_TYPE_ID" type="INTEGER" isPrimaryKey="true"
    isMandatory="true" length="22"/>
                    <db-attribute name="COLLECTION_TYPE_NAME" type="VARCHAR"
    isMandatory="true" length="20"/>
            </db-entity>

            <obj-entity name="DataCollection"
    className="com.escholar.datamgr.model.DataCollection"
    dbEntityName="DATA_COLLECTION">
                    <obj-attribute name="activeInd" type="java.lang.String"
    db-attribute-path="ACTIVE_IND"/>
                    <obj-attribute name="autoCloseDate" type="java.util.Date"
    db-attribute-path="AUTO_CLOSE_DATE"/>
                    <obj-attribute name="autoOpenDate" type="java.util.Date"
    db-attribute-path="AUTO_OPEN_DATE"/>
                    <obj-attribute name="collectionName" type="java.lang.String"
    db-attribute-path="COLLECTION_NAME"/>
                    <obj-attribute name="description" type="java.lang.String"
    db-attribute-path="DESCRIPTION"/>
                    <obj-attribute name="lastModifiedBy" type="java.lang.String"
    db-attribute-path="LAST_MODIFIED_BY"/>
                    <obj-attribute name="lastModifiedTime" type="java.util.Date"
    db-attribute-path="LAST_MODIFIED_TIME"/>
                    <obj-attribute name="schoolYear" type="java.util.Date"
    db-attribute-path="SCHOOL_YEAR"/>
                    <obj-attribute name="snapshotDate" type="java.util.Date"
    db-attribute-path="SNAPSHOT_DATE"/>
                    <obj-attribute name="suptApprovalReqd" type="java.lang.String"
    db-attribute-path="SUPT_APPROVAL_REQD"/>
            </obj-entity>
            <obj-entity name="K12DataCollection" superEntityName="DataCollection"
    className="com.escholar.datamgr.model.K12DataCollection"
    dbEntityName="DATA_COLLECTION">
                    <qualifier><![CDATA[collectionTypeId = 3]]></qualifier>
                    <obj-attribute name="schoolYear" type="java.util.Date"
    db-attribute-path="SCHOOL_YEAR"/>
                    <obj-attribute name="snapshotDate" type="java.util.Date"
    db-attribute-path="SNAPSHOT_DATE"/>
            </obj-entity>

            <obj-entity name="DataCollectionType"
    className="com.escholar.datamgr.model.DataCollectionType"
    dbEntityName="DATA_COLLECTION_TYPE">
                    <obj-attribute name="collectionTypeDesc" type="java.lang.String"
    db-attribute-path="COLLECTION_TYPE_DESC"/>
                    <obj-attribute name="collectionTypeId" type="java.lang.Integer"
    db-attribute-path="COLLECTION_TYPE_ID"/>
                    <obj-attribute name="collectionTypeName" type="java.lang.String"
    db-attribute-path="COLLECTION_TYPE_NAME"/>
            </obj-entity>

            <db-relationship name="k12DataCollection" source="DATA_COLLECTION"
    target="K12_DATA_COLLECTION" toDependentPK="true" toMany="false">
                    <db-attribute-pair source="DATA_COLLECTION_ID"
    target="DATA_COLLECTION_ID"/>
            </db-relationship>

            <db-relationship name="dataCollection" source="K12_DATA_COLLECTION"
    target="DATA_COLLECTION" toMany="false">
                    <db-attribute-pair source="DATA_COLLECTION_ID"
    target="DATA_COLLECTION_ID"/>
            </db-relationship>

            <db-relationship name="collectionType" source="DATA_COLLECTION"
    target="DATA_COLLECTION_TYPE" toMany="false">
                    <db-attribute-pair source="COLLECTION_TYPE_ID"
    target="COLLECTION_TYPE_ID"/>
            </db-relationship>

            <db-relationship name="dataCollections" source="DATA_COLLECTION_TYPE"
    target="DATA_COLLECTION" toMany="true">
                    <db-attribute-pair source="COLLECTION_TYPE_ID"
    target="COLLECTION_TYPE_ID"/>
            </db-relationship>

            <obj-relationship name="collectionType" source="DataCollection"
    target="DataCollectionType" deleteRule="Nullify"
    db-relationship-path="collectionType"/>

            <obj-relationship name="k12DataCollection" source="DataCollection"
    target="K12DataCollection" deleteRule="Nullify"
    db-relationship-path="k12DataCollection"/>

            <obj-relationship name="dataCollections" source="DataCollectionType"
    target="DataCollection" deleteRule="Deny"
    db-relationship-path="dataCollections"/>

    I apologize for the confusion.

    thanks again,
    Julie

            <db-relationship name="dataCollections" source="DATA_COLLECTION_TYPE"
    target="DATA_COLLECTION" toMany="true">
                    <db-attribute-pair source="COLLECTION_TYPE_ID"
    target="COLLECTION_TYPE_ID"/>
            </db-relationship>

    -- 
    View this message in context: http://cayenne.195.n3.nabble.com/Vertical-inheritance-tp827636p1352997.html
    Sent from the Cayenne - Dev mailing list archive at Nabble.com.
    



    This archive was generated by hypermail 2.0.0 : Thu Aug 26 2010 - 14:11:42 UTC