← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14750: TEI, renamed foreign key

 

------------------------------------------------------------
revno: 14750
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-08 17:44:49 +0200
message:
  TEI, renamed foreign key
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramValidation.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityForm.hbm.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2014-02-17 15:00:27 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2014-04-08 15:44:49 +0000
@@ -81,20 +81,18 @@
 
 	<property name="relationshipText" />
 
-	<many-to-one name="relationshipType"
-		class="org.hisp.dhis.relationship.RelationshipType" column="relationshiptypeid"
-		foreign-key="fk_program_relationshipid" />
+	<many-to-one name="relationshipType" class="org.hisp.dhis.relationship.RelationshipType" 
+	   column="relationshiptypeid" foreign-key="fk_program_relationshipid" />
 
 	<property name="relationshipFromA" />
 
 	<many-to-one name="relatedProgram" class="org.hisp.dhis.program.Program"
-		column="relatedprogramid" foreign-key="fk_program_relatedprogram" />
+	   column="relatedprogramid" foreign-key="fk_program_relatedprogram" />
 
 	<property name="dataEntryMethod" />
 	
-	<many-to-one name="trackedEntity"
-		class="org.hisp.dhis.trackedentity.TrackedEntity" column="trackedentityid"
-		foreign-key="fk_program_trackedentityid" />
+	<many-to-one name="trackedEntity" class="org.hisp.dhis.trackedentity.TrackedEntity" 
+	   column="trackedentityid" foreign-key="fk_program_trackedentityid" />
 
 	<!-- Access properties -->
 

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml	2013-04-17 07:58:14 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramIndicator.hbm.xml	2014-04-08 15:44:49 +0000
@@ -19,7 +19,8 @@
     
     <property name="description" />
 
-    <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid" foreign-key="fk_programindicator_program" />
+    <many-to-one name="program" class="org.hisp.dhis.program.Program" 
+        column="programid" foreign-key="fk_programindicator_program" />
 
     <property name="valueType" />
     

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2014-03-10 17:22:32 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2014-04-08 15:44:49 +0000
@@ -33,8 +33,8 @@
 			<one-to-many class="org.hisp.dhis.program.ProgramStageDataElement" />
 		</set>
 
-		<many-to-one name="dataEntryForm"
-			class="org.hisp.dhis.dataentryform.DataEntryForm" foreign-key="fk_programstage_dataentryform" cascade="all" />
+		<many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm" 
+		  column="dataentryformid" foreign-key="fk_programstage_dataentryform" cascade="all" />
 
 		<property name="standardInterval" />
 

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml	2014-04-08 15:44:49 +0000
@@ -17,12 +17,10 @@
 		<property name="lastUpdated" type="timestamp" />
 
 		<many-to-one name="programInstance" class="org.hisp.dhis.program.ProgramInstance"
-			column="programinstanceid" not-null="true"
-			foreign-key="fk_programstageinstance_programinstanceid" />
+			column="programinstanceid" not-null="true" foreign-key="fk_programstageinstance_programinstanceid" />
 
 		<many-to-one name="programStage" class="org.hisp.dhis.program.ProgramStage"
-			column="programstageid" not-null="true"
-			foreign-key="fk_programstageinstance_programstageid" />
+			column="programstageid" not-null="true"	foreign-key="fk_programstageinstance_programstageid" />
 
 		<property name="dueDate" column="duedate" />
 
@@ -58,9 +56,8 @@
 
 		<property name="completedDate" />
 		
-		<many-to-one name="comment" cascade="all"
-			class="org.hisp.dhis.trackedentitycomment.TrackedEntityComment" column="trackedentitycommentid"
-			foreign-key="fk_programinstance_commentid" />
+		<many-to-one name="comment" cascade="all" class="org.hisp.dhis.trackedentitycomment.TrackedEntityComment" 
+		    column="trackedentitycommentid" foreign-key="fk_programinstance_commentid" />
 
 	</class>
 </hibernate-mapping>

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramValidation.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramValidation.hbm.xml	2013-02-07 10:25:34 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/program/hibernate/ProgramValidation.hbm.xml	2014-04-08 15:44:49 +0000
@@ -15,20 +15,18 @@
 
     <property name="name" column="name" not-null="true" unique="true" length="230" />
 
-    <many-to-one name="leftSide" column="leftprogramexpressionid"
-      class="org.hisp.dhis.program.ProgramExpression" cascade="all"
-      foreign-key="fk_programvalidation_leftprogramexpressionid" />
+    <many-to-one name="leftSide" class="org.hisp.dhis.program.ProgramExpression" cascade="all"
+      column="leftprogramexpressionid" foreign-key="fk_programvalidation_leftprogramexpressionid" />
 
     <property name="operator" type="org.hisp.dhis.expression.OperatorUserType">
       <column name="operator" unique="false" />
     </property>
 
-    <many-to-one name="rightSide" column="rightprogramexpressionid"
-      class="org.hisp.dhis.program.ProgramExpression" cascade="all"
-      foreign-key="fk_programvalidation_rightprogramexpressionid" />
+    <many-to-one name="rightSide" class="org.hisp.dhis.program.ProgramExpression" cascade="all"
+      column="rightprogramexpressionid" foreign-key="fk_programvalidation_rightprogramexpressionid" />
 
-    <many-to-one name="program" class="org.hisp.dhis.program.Program"
-      column="programid" not-null="true" foreign-key="fk_programvalidation_programid" />
+    <many-to-one name="program" class="org.hisp.dhis.program.Program" not-null="true" 
+      column="programid" foreign-key="fk_programvalidation_programid" />
 
   </class>
 </hibernate-mapping>

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml	2014-04-04 17:43:59 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityAttribute.hbm.xml	2014-04-08 15:44:49 +0000
@@ -21,12 +21,11 @@
 
     <property name="valueType" column="valuetype" not-null="true" />
 
-    <many-to-one name="attributeGroup" column="trackedentityattributegroupid"
-      class="org.hisp.dhis.trackedentity.TrackedEntityAttributeGroup"
-      foreign-key="fk_attribute_group" />
+    <many-to-one name="attributeGroup" class="org.hisp.dhis.trackedentity.TrackedEntityAttributeGroup" 
+        column="trackedentityattributegroupid" foreign-key="fk_trackedentityattribute_attributegroupid" />
 
-    <many-to-one name="optionSet" class="org.hisp.dhis.option.OptionSet" column="optionsetid"
-      foreign-key="fk_trackedentityattribute_optionsetid" />
+    <many-to-one name="optionSet" class="org.hisp.dhis.option.OptionSet" 
+        column="optionsetid" foreign-key="fk_trackedentityattribute_optionsetid" />
 
     <property name="inherit" column="inherit" />
 
@@ -46,11 +45,12 @@
 
     <property name="programScope" />
 
-    <many-to-one name="periodType" class="org.hisp.dhis.period.PeriodType" column="periodtypeid"
-      foreign-key="fk_trackedentityattribute_periodtypeid" />
+    <many-to-one name="periodType" class="org.hisp.dhis.period.PeriodType" 
+        column="periodtypeid" foreign-key="fk_trackedentityattribute_periodtypeid" />
 
     <!-- Access properties -->
-    <many-to-one name="user" class="org.hisp.dhis.user.User" column="userid" foreign-key="fk_trackedentityattribute_userid" />
+    <many-to-one name="user" class="org.hisp.dhis.user.User" 
+        column="userid" foreign-key="fk_trackedentityattribute_userid" />
 
     <property name="publicAccess" length="8" />
 

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityForm.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityForm.hbm.xml	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/trackedentity/hibernate/TrackedEntityForm.hbm.xml	2014-04-08 15:44:49 +0000
@@ -16,11 +16,11 @@
     
  	&identifiableProperties;
  
-    <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid"
-      foreign-key="fk_trackedentityform_programid" />
+    <many-to-one name="program" class="org.hisp.dhis.program.Program" 
+        column="programid" foreign-key="fk_trackedentityform_programid" />
 
     <many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm"
-      foreign-key="fk_trackedentityform_dataentryformid" cascade="all" />
+        column="dataentryformid" foreign-key="fk_trackedentityform_dataentryformid" cascade="all" />
     
   </class>
 </hibernate-mapping>