cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julia Filho <jfil...@yahoo.com>
Subject Re: Vertical inheritance
Date Thu, 26 Aug 2010 13:51:48 GMT

Hi,

Relevant mapping sections are:

	<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="SUPT_APPROVAL_REQD" type="CHAR" isMandatory="true"
length="1"/>
	</db-entity>

	</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="dataCollectionId" type="java.lang.Integer"
db-attribute-path="DATA_COLLECTION_ID"/>
		<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="suptApprovalReqd" type="java.lang.String"
db-attribute-path="SUPT_APPROVAL_REQD"/>
	</obj-entity>


	<obj-entity name="K12DataCollection"
className="com.escholar.datamgr.model.K12DataCollection"
dbEntityName="K12_DATA_COLLECTION">
		<obj-attribute name="dataCollectionId" type="java.lang.Integer"
db-attribute-path="DATA_COLLECTION_ID"/>
		<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="dataCollection"/>


(I thing that's it)

ANother thing to note is that the superclass, DataCollection is not abstract
- not sure if that matters or not.

thank you very much for your help!
Julie Filho

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

Mime
View raw message