← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3517: Remove 'laze=false' and 'inverse=true' on bidirectional one-to-many associations into patient hib...

 

------------------------------------------------------------
revno: 3517
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-05-06 11:41:35 +0700
message:
  Remove 'laze=false' and 'inverse=true' on bidirectional one-to-many associations into patient hibernate mapping file.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeOption.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml
  dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm


--
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-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml	2011-05-02 14:48:05 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml	2011-05-06 04:41:35 +0000
@@ -32,7 +32,7 @@
 
     <property name="dobType" column="dobType" />
 
-    <set name="identifiers" inverse="true" cascade="all">
+    <set name="identifiers" cascade="all">
       <key column="patientid" />
       <one-to-many class="org.hisp.dhis.patient.PatientIdentifier" />
     </set>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml	2011-05-02 14:58:11 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml	2011-05-06 04:41:35 +0000
@@ -27,7 +27,7 @@
     <many-to-one name="patientMobileSetting" column="patientMobileSettingId" foreign-key="fk_patient_mobile_setting" />
 
     <many-to-one name="patientAttributeGroup" column="patientattributegroupid" class="org.hisp.dhis.patient.PatientAttributeGroup"
-      foreign-key="fk_attribute_group" lazy="false" />
+      foreign-key="fk_attribute_group" />
 
     <set name="attributeOptions">
       <key column="patientattributeid" />

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeOption.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeOption.hbm.xml	2011-04-12 13:44:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeOption.hbm.xml	2011-05-06 04:41:35 +0000
@@ -13,7 +13,7 @@
     <property name="name" not-null="true" length="160" />
 
     <many-to-one name="patientAttribute" column="patientattributeid" class="org.hisp.dhis.patient.PatientAttribute"
-      foreign-key="fk_patientattributeoption_patientattributeid" lazy="false" />
+      foreign-key="fk_patientattributeoption_patientattributeid" />
 
   </class>
 </hibernate-mapping>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2011-05-02 14:48:05 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml	2011-05-06 04:41:35 +0000
@@ -20,7 +20,7 @@
 
     <property name="dateOfIncidentDescription" type="text" not-null="true" />
 
-    <set name="programStages" order-by="stageinprogram" inverse="true" cascade="all">
+    <set name="programStages" order-by="stageinprogram" cascade="all">
       <key column="programid" />
       <one-to-many class="org.hisp.dhis.program.ProgramStage" />
     </set>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml	2011-04-12 13:44:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttribute.hbm.xml	2011-05-06 04:41:35 +0000
@@ -16,7 +16,7 @@
 
     <property name="valueType" not-null="true" />
 
-    <set name="attributeOptions" lazy="false" cascade="all">
+    <set name="attributeOptions" cascade="all" >
       <key column="programattributeid" />
       <one-to-many class="org.hisp.dhis.program.ProgramAttributeOption" />
     </set>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml	2011-05-02 14:48:05 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml	2011-05-06 04:41:35 +0000
@@ -24,7 +24,7 @@
     <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid" not-null="true"
       foreign-key="fk_programinstance_programid" />
 
-    <set name="programStageInstances" order-by="stageinprogram" inverse="true" cascade="all">
+    <set name="programStageInstances" order-by="stageinprogram" cascade="all">
       <key column="programinstanceid" />
       <one-to-many class="org.hisp.dhis.program.ProgramStageInstance" />
     </set>

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2011-04-12 13:44:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml	2011-05-06 04:41:35 +0000
@@ -20,7 +20,7 @@
 
     <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid" foreign-key="fk_programstage_program" />
 
-    <set name="programStageDataElements" inverse="true">
+    <set name="programStageDataElements" >
       <key column="programstageid" />
       <one-to-many class="org.hisp.dhis.program.ProgramStageDataElement" />
     </set>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2011-05-05 21:17:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2011-05-06 04:41:35 +0000
@@ -740,13 +740,18 @@
 {
 	showLoader();
 	
-	var url  = 'searchPatient.action?';
-		url += 'searchText=' + getFieldValue('searchText');
-		url += '&searchingAttributeId=' + getFieldValue('searchingAttributeId');
-		url += '&sortPatientAttributeId=' + getFieldValue('sortPatientAttributeId');
-		url += '&programId=' + getFieldValue('programId');
-	$('#contentDiv').load(url);
-	
+	$.post("searchPatient.action",
+		{
+			searchText: getFieldValue('searchText'),
+			searchingAttributeId: getFieldValue('searchingAttributeId'),
+			sortPatientAttributeId: getFieldValue('sortPatientAttributeId'),
+			programId: getFieldValue('programId')
+		},
+		function (data)
+		{
+			setInnerHTML('contentDiv', data);
+		},'html');
+		
 	hideLoader();
 }
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm	2011-05-05 21:18:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patient.vm	2011-05-06 04:41:35 +0000
@@ -63,9 +63,6 @@
 <p></p>
 <p></p>
 
-
-<div id='contentDiv'></div>
-
 <script type="text/javascript">
 	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ) , "'")';
 </script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm	2011-05-05 21:18:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm	2011-05-06 04:41:35 +0000
@@ -28,6 +28,8 @@
 
 #parse( "dhis-web-commons/loader/loader.vm" )
 
+<div id='contentDiv'></div>
+
 <script>
 	var i18n_can_not_register_patient_for_orgunit = '$encoder.jsEscape( $i18n.getString( "can_not_register_patient_for_orgunit" ), "'")';	
 </script>
\ No newline at end of file