dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11631
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3371: added not-null="true" for int/boolean primitives in dhis-service-patient (and formatting..)
------------------------------------------------------------
revno: 3371
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-04-12 15:44:50 +0200
message:
added not-null="true" for int/boolean primitives in dhis-service-patient (and formatting..)
modified:
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/caseaggregation/hibernate/CaseAggregationCondition.hbm.xml
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/PatientAttributeGroup.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/patient/hibernate/PatientIdentifier.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientMobileSetting.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientattributevalue/hibernate/PatientAttributeValue.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.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/ProgramAttributeOption.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-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElementValidation.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/Relationship.hbm.xml
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.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-patient/src/main/resources/org/hisp/dhis/caseaggregation/hibernate/CaseAggregationCondition.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/caseaggregation/hibernate/CaseAggregationCondition.hbm.xml 2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/caseaggregation/hibernate/CaseAggregationCondition.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,24 +4,23 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.caseaggregation.CaseAggregationCondition"
- table="caseaggregationcondition">
-
- <id name="id" column="caseaggregationconditionid">
- <generator class="native" />
- </id>
-
- <property name="operator" not-null="true" />
-
- <property name="aggregationExpression" not-null="true" />
-
- <property name="description" />
-
- <many-to-one name="aggregationDataElement" class="org.hisp.dhis.dataelement.DataElement"
- column="aggregationDataElementid" foreign-key="fk_caseaggregationcondition_dataelement"/>
-
- <many-to-one name="optionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo"
- column="optionComboid" foreign-key="fk_caseaggregationcondition_categoryoptioncomboid"/>
-
- </class>
-</hibernate-mapping>
\ No newline at end of file
+ <class name="org.hisp.dhis.caseaggregation.CaseAggregationCondition" table="caseaggregationcondition">
+
+ <id name="id" column="caseaggregationconditionid">
+ <generator class="native" />
+ </id>
+
+ <property name="operator" not-null="true" />
+
+ <property name="aggregationExpression" not-null="true" />
+
+ <property name="description" />
+
+ <many-to-one name="aggregationDataElement" class="org.hisp.dhis.dataelement.DataElement" column="aggregationDataElementid"
+ foreign-key="fk_caseaggregationcondition_dataelement" />
+
+ <many-to-one name="optionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" column="optionComboid"
+ foreign-key="fk_caseaggregationcondition_categoryoptioncomboid" />
+
+ </class>
+</hibernate-mapping>
=== 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-01-11 01:56:03 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,56 +4,53 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.Patient" table="patient">
-
- <id name="id" column="patientid">
- <generator class="native" />
- </id>
-
- <property name="firstName" column="firstname" length="50" />
-
- <property name="middleName" column="middlename" length="50" />
-
- <property name="lastName" column="lastname" length="50" />
-
- <property name="birthDate" column="birthdate" not-null="true"/>
-
- <property name="deathDate" column="deathdate" />
-
- <property name="registrationDate" column="registrationdate" not-null="true"/>
-
- <property name="isDead" column="isdead" />
-
- <property name="bloodGroup" column="bloodgroup" length="5"/>
-
- <property name="gender" column="gender" length="5" not-null="true"/>
-
- <property name="underAge" column="underage" not-null="true"/>
-
- <property name="dobType" column="dobType"/>
-
- <set name="identifiers" inverse="true" cascade="all">
- <key column="patientid" />
- <one-to-many class="org.hisp.dhis.patient.PatientIdentifier" />
- </set>
-
- <set name="programs" table="patient_programs">
- <key column="patientid" />
- <many-to-many class="org.hisp.dhis.program.Program"
- column="programid" foreign-key="fk_patient_programid" />
- </set>
-
- <set name="attributes" table="patient_attributes">
- <key column="patientid" />
- <many-to-many class="org.hisp.dhis.patient.PatientAttribute"
- column="patientattributeid" foreign-key="fk_patient_patientattributeid" />
- </set>
-
- <many-to-one name="representative" class="org.hisp.dhis.patient.Patient"
- column="representativeid" foreign-key="fk_representativeid" />
-
- <many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit"
- column="organisationunitid"/>
-
- </class>
-</hibernate-mapping>
\ No newline at end of file
+ <class name="org.hisp.dhis.patient.Patient" table="patient">
+
+ <id name="id" column="patientid">
+ <generator class="native" />
+ </id>
+
+ <property name="firstName" column="firstname" length="50" />
+
+ <property name="middleName" column="middlename" length="50" />
+
+ <property name="lastName" column="lastname" length="50" />
+
+ <property name="birthDate" column="birthdate" not-null="true" />
+
+ <property name="deathDate" column="deathdate" />
+
+ <property name="registrationDate" column="registrationdate" not-null="true" />
+
+ <property name="isDead" column="isdead" />
+
+ <property name="bloodGroup" column="bloodgroup" length="5" />
+
+ <property name="gender" column="gender" length="5" not-null="true" />
+
+ <property name="underAge" column="underage" not-null="true" />
+
+ <property name="dobType" column="dobType" />
+
+ <set name="identifiers" inverse="true" cascade="all">
+ <key column="patientid" />
+ <one-to-many class="org.hisp.dhis.patient.PatientIdentifier" />
+ </set>
+
+ <set name="programs" table="patient_programs">
+ <key column="patientid" />
+ <many-to-many class="org.hisp.dhis.program.Program" column="programid" foreign-key="fk_patient_programid" />
+ </set>
+
+ <set name="attributes" table="patient_attributes">
+ <key column="patientid" />
+ <many-to-many class="org.hisp.dhis.patient.PatientAttribute" column="patientattributeid" foreign-key="fk_patient_patientattributeid" />
+ </set>
+
+ <many-to-one name="representative" class="org.hisp.dhis.patient.Patient" column="representativeid"
+ foreign-key="fk_representativeid" />
+
+ <many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid" />
+
+ </class>
+</hibernate-mapping>
=== 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 2010-12-10 05:57:24 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttribute.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,35 +4,35 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.PatientAttribute" table="patientattribute">
+ <class name="org.hisp.dhis.patient.PatientAttribute" table="patientattribute">
+
<id name="id" column="patientattributeid">
- <generator class="native"/>
- </id>
-
- <property name="name" not-null="true" unique="true" length="160"/>
-
- <property name="description"/>
-
- <property name="valueType" column="valuetype" not-null="true"/>
-
- <property name="mandatory" column="mandatory" not-null="true" />
-
- <property name="inheritable" column="inheritable" />
-
- <property name="noChars"/>
-
- <property name="groupBy" column="groupby" />
-
- <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" insert="true" />
-
- <set name="attributeOptions" >
- <key column="patientattributeid"/>
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" unique="true" length="160" />
+
+ <property name="description" />
+
+ <property name="valueType" column="valuetype" not-null="true" />
+
+ <property name="mandatory" column="mandatory" not-null="true" />
+
+ <property name="inheritable" column="inheritable" />
+
+ <property name="noChars" />
+
+ <property name="groupBy" column="groupby" />
+
+ <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" insert="true" />
+
+ <set name="attributeOptions">
+ <key column="patientattributeid" />
<one-to-many class="org.hisp.dhis.patient.PatientAttributeOption" />
</set>
-
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml 2010-03-09 07:55:42 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientAttributeGroup.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,20 +4,21 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.PatientAttributeGroup" table="patientattributegroup">
- <id name="id" column="patientattributegroupid">
- <generator class="native" />
- </id>
-
- <property name="name" not-null="true" unique="true" length="160" />
-
- <property name="description" />
-
- <list name="attributes" table="patientattributegroupmembers">
- <key column="patientattributegroupid"/>
- <list-index column="sort_order" base="1"/>
- <one-to-many class="org.hisp.dhis.patient.PatientAttribute"/>
- </list>
-
- </class>
-</hibernate-mapping>
\ No newline at end of file
+ <class name="org.hisp.dhis.patient.PatientAttributeGroup" table="patientattributegroup">
+
+ <id name="id" column="patientattributegroupid">
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" unique="true" length="160" />
+
+ <property name="description" />
+
+ <list name="attributes" table="patientattributegroupmembers">
+ <key column="patientattributegroupid" />
+ <list-index column="sort_order" base="1" />
+ <one-to-many class="org.hisp.dhis.patient.PatientAttribute" />
+ </list>
+
+ </class>
+</hibernate-mapping>
=== 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 2010-02-22 09:19:15 +0000
+++ 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
@@ -4,16 +4,16 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.PatientAttributeOption" table="patientattributeoption">
+ <class name="org.hisp.dhis.patient.PatientAttributeOption" table="patientattributeoption">
+
<id name="id" column="patientattributeoptionid">
- <generator class="native"/>
- </id>
-
- <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" />
-
+ <generator class="native" />
+ </id>
+
+ <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" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifier.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifier.hbm.xml 2010-10-20 13:34:22 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifier.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,21 +4,20 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.PatientIdentifier" table="patientidentifier">
-
- <id name="id" column="patientidentifierid">
- <generator class="native"/>
- </id>
-
- <many-to-one name="identifierType" class="org.hisp.dhis.patient.PatientIdentifierType"
- column="patientidentifiertypeid" foreign-key="fk_patientidentifier_patientidentifiertypeid"/>
-
- <many-to-one name="patient" class="org.hisp.dhis.patient.Patient"
- column="patientid" not-null="true"/>
-
- <property name="identifier" length="31" not-null="true"/>
-
- <property name="preferred" not-null="true"/>
-
- </class>
-</hibernate-mapping>
\ No newline at end of file
+ <class name="org.hisp.dhis.patient.PatientIdentifier" table="patientidentifier">
+
+ <id name="id" column="patientidentifierid">
+ <generator class="native" />
+ </id>
+
+ <many-to-one name="identifierType" class="org.hisp.dhis.patient.PatientIdentifierType" column="patientidentifiertypeid"
+ foreign-key="fk_patientidentifier_patientidentifiertypeid" />
+
+ <many-to-one name="patient" class="org.hisp.dhis.patient.Patient" column="patientid" not-null="true" />
+
+ <property name="identifier" length="31" not-null="true" />
+
+ <property name="preferred" not-null="true" />
+
+ </class>
+</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2010-10-28 09:17:13 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,24 +4,25 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.PatientIdentifierType" table="patientidentifiertype">
+ <class name="org.hisp.dhis.patient.PatientIdentifierType" table="patientidentifiertype">
+
<id name="id" column="patientidentifiertypeid">
- <generator class="native"/>
- </id>
-
- <property name="name" not-null="true" unique="true" length="160"/>
-
- <property name="description"/>
-
- <property name="format"/>
-
- <property name="mandatory" not-null="true"/>
-
- <property name="related" not-null="true"/>
-
- <property name="noChars"/>
-
- <property name="type"/>
-
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" unique="true" length="160" />
+
+ <property name="description" />
+
+ <property name="format" />
+
+ <property name="mandatory" not-null="true" />
+
+ <property name="related" not-null="true" />
+
+ <property name="noChars" />
+
+ <property name="type" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientMobileSetting.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientMobileSetting.hbm.xml 2010-11-25 08:05:58 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientMobileSetting.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,25 +4,27 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patient.PatientMobileSetting" table="patientmobilesetting">
- <id name="id" column="patientmobilesettingid">
- <generator class="native" />
- </id>
-
- <property name="gender" column="gender" not-null="true"/>
-
- <property name="dobtype" column="dobtype" not-null="true"/>
-
- <property name="birthdate" column="birthdate" not-null="true"/>
-
- <property name="bloodgroup" column="bloodgroup" not-null="true"/>
-
- <property name="registrationdate" column="registrationdate" not-null="true"/>
-
- <list name="patientAttributes">
- <key column="patientmobilesettingid" />
- <list-index column="sort_order_patientattributename" base="0"/>
- <one-to-many class="org.hisp.dhis.patient.PatientAttribute" />
- </list>
- </class>
-</hibernate-mapping>
\ No newline at end of file
+ <class name="org.hisp.dhis.patient.PatientMobileSetting" table="patientmobilesetting">
+
+ <id name="id" column="patientmobilesettingid">
+ <generator class="native" />
+ </id>
+
+ <property name="gender" column="gender" not-null="true" />
+
+ <property name="dobtype" column="dobtype" not-null="true" />
+
+ <property name="birthdate" column="birthdate" not-null="true" />
+
+ <property name="bloodgroup" column="bloodgroup" not-null="true" />
+
+ <property name="registrationdate" column="registrationdate" not-null="true" />
+
+ <list name="patientAttributes">
+ <key column="patientmobilesettingid" />
+ <list-index column="sort_order_patientattributename" base="0" />
+ <one-to-many class="org.hisp.dhis.patient.PatientAttribute" />
+ </list>
+
+ </class>
+</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientattributevalue/hibernate/PatientAttributeValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientattributevalue/hibernate/PatientAttributeValue.hbm.xml 2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientattributevalue/hibernate/PatientAttributeValue.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,21 +4,19 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
-
- <class name="org.hisp.dhis.patientattributevalue.PatientAttributeValue" table="patientattributevalue">
-
- <composite-id>
- <key-many-to-one name="patient" class="org.hisp.dhis.patient.Patient"
- column="patientid" foreign-key="fk_patientattributevalue_patientid"/>
- <key-many-to-one name="patientAttribute" class="org.hisp.dhis.patient.PatientAttribute"
- column="patientattributeid" foreign-key="fk_patientattributevalue_patientattributeid"/>
- </composite-id>
-
- <property name="value"/>
-
- <many-to-one name="patientAttributeOption" class="org.hisp.dhis.patient.PatientAttributeOption"
- column="patientattributeoptionid" foreign-key="fk_patientAttributeValue_patientAttributeOption"/>
-
+ <class name="org.hisp.dhis.patientattributevalue.PatientAttributeValue" table="patientattributevalue">
+
+ <composite-id>
+ <key-many-to-one name="patient" class="org.hisp.dhis.patient.Patient" column="patientid"
+ foreign-key="fk_patientattributevalue_patientid" />
+ <key-many-to-one name="patientAttribute" class="org.hisp.dhis.patient.PatientAttribute" column="patientattributeid"
+ foreign-key="fk_patientattributevalue_patientattributeid" />
+ </composite-id>
+
+ <property name="value" />
+
+ <many-to-one name="patientAttributeOption" class="org.hisp.dhis.patient.PatientAttributeOption" column="patientattributeoptionid"
+ foreign-key="fk_patientAttributeValue_patientAttributeOption" />
+
</class>
-
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.hbm.xml 2010-11-25 22:22:10 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patientdatavalue/hibernate/PatientDataValue.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,25 +4,25 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.patientdatavalue.PatientDataValue" table="patientdatavalue">
-
- <composite-id>
- <key-many-to-one name="programStageInstance" class="org.hisp.dhis.program.ProgramStageInstance"
- column="programstageinstanceid" foreign-key="fk_patientdatavalue_programstageinstanceid"/>
- <key-many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement"
- column="dataelementid" foreign-key="fk_patientdatavalue_dataelementid"/>
- <key-many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit"
- column="organisationunitid" foreign-key="fk_patientdatavalue_organisationunitid"/>
- </composite-id>
-
- <many-to-one name="optionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo"
- column="categoryoptioncomboid" foreign-key="fk_patientdatavalue_categoryoptioncomboid"/>
-
- <property name="value"/>
-
- <property name="providedByAnotherFacility" column="providedbyanotherfacility" not-null="true"/>
-
- <property name="timestamp" type="date"/>
-
+ <class name="org.hisp.dhis.patientdatavalue.PatientDataValue" table="patientdatavalue">
+
+ <composite-id>
+ <key-many-to-one name="programStageInstance" class="org.hisp.dhis.program.ProgramStageInstance"
+ column="programstageinstanceid" foreign-key="fk_patientdatavalue_programstageinstanceid" />
+ <key-many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement" column="dataelementid"
+ foreign-key="fk_patientdatavalue_dataelementid" />
+ <key-many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit"
+ column="organisationunitid" foreign-key="fk_patientdatavalue_organisationunitid" />
+ </composite-id>
+
+ <many-to-one name="optionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" column="categoryoptioncomboid"
+ foreign-key="fk_patientdatavalue_categoryoptioncomboid" />
+
+ <property name="value" />
+
+ <property name="providedByAnotherFacility" column="providedbyanotherfacility" not-null="true" />
+
+ <property name="timestamp" type="date" />
+
</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 2010-12-27 03:17:34 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/Program.hbm.xml 2011-04-12 13:44:50 +0000
@@ -5,41 +5,39 @@
<hibernate-mapping>
<class name="org.hisp.dhis.program.Program" table="program">
-
+
<id name="id" column="programid">
- <generator class="native"/>
- </id>
-
- <property name="name" not-null="true" unique="true" length="160"/>
-
- <property name="description" type="text"/>
-
- <property name="version"/>
-
- <property name="dateOfEnrollmentDescription" type="text" not-null="true"/>
-
- <property name="dateOfIncidentDescription" type="text" not-null="true"/>
-
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" unique="true" length="160" />
+
+ <property name="description" type="text" />
+
+ <property name="version" />
+
+ <property name="dateOfEnrollmentDescription" type="text" not-null="true" />
+
+ <property name="dateOfIncidentDescription" type="text" not-null="true" />
+
<set name="programStages" order-by="stageinprogram" inverse="true" cascade="all">
- <key column="programid"/>
- <one-to-many class="org.hisp.dhis.program.ProgramStage"/>
+ <key column="programid" />
+ <one-to-many class="org.hisp.dhis.program.ProgramStage" />
</set>
-
+
<set name="organisationUnits" table="program_organisationunits">
- <key column="programid"/>
- <many-to-many column="organisationunitid"
- class="org.hisp.dhis.organisationunit.OrganisationUnit"/>
- </set>
-
+ <key column="programid" />
+ <many-to-many column="organisationunitid" class="org.hisp.dhis.organisationunit.OrganisationUnit" />
+ </set>
+
<set name="patientValidationCriteria" table="program_criteria">
- <key column="programid"/>
- <many-to-many column="validationcriteriaid"
- class="org.hisp.dhis.validation.ValidationCriteria" />
- </set>
-
- <property name="minDaysAllowedInputData"/>
-
- <property name="maxDaysAllowedInputData"/>
-
+ <key column="programid" />
+ <many-to-many column="validationcriteriaid" class="org.hisp.dhis.validation.ValidationCriteria" />
+ </set>
+
+ <property name="minDaysAllowedInputData" />
+
+ <property name="maxDaysAllowedInputData" />
+
</class>
</hibernate-mapping>
=== 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 2010-11-09 02:09:53 +0000
+++ 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
@@ -5,21 +5,21 @@
<hibernate-mapping>
<class name="org.hisp.dhis.program.ProgramAttribute" table="programattribute">
-
+
<id name="id" column="programattributeid">
- <generator class="native"/>
- </id>
-
- <property name="name" not-null="true" unique="true"/>
-
- <property name="description"/>
-
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" unique="true" />
+
+ <property name="description" />
+
<property name="valueType" not-null="true" />
-
- <set name="attributeOptions" lazy="false" cascade="all">
- <key column="programattributeid"/>
+
+ <set name="attributeOptions" lazy="false" cascade="all">
+ <key column="programattributeid" />
<one-to-many class="org.hisp.dhis.program.ProgramAttributeOption" />
</set>
-
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.hbm.xml 2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramAttributeOption.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,16 +4,16 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.program.ProgramAttributeOption" table="programattributeoption">
+ <class name="org.hisp.dhis.program.ProgramAttributeOption" table="programattributeoption">
+
<id name="id" column="programattributeoptionid">
- <generator class="native"/>
- </id>
-
- <property name="name" not-null="true" length="160"/>
-
- <many-to-one name="programAttribute" column="programattributeid"
- class="org.hisp.dhis.program.ProgramAttribute"
- foreign-key="fk_programattributeoption_programattributeid" lazy="false" insert="true" />
-
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" length="160" />
+
+ <many-to-one name="programAttribute" column="programattributeid" class="org.hisp.dhis.program.ProgramAttribute"
+ foreign-key="fk_programattributeoption_programattributeid" lazy="false" insert="true" />
+
</class>
</hibernate-mapping>
=== 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 2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2011-04-12 13:44:50 +0000
@@ -5,35 +5,34 @@
<hibernate-mapping>
<class name="org.hisp.dhis.program.ProgramInstance" table="programinstance">
-
+
<id name="id" column="programinstanceid">
- <generator class="native"/>
+ <generator class="native" />
</id>
- <property name="dateOfIncident" column="dateofincident" not-null="true"/>
-
- <property name="enrollmentDate" column="enrollmentdate" not-null="true"/>
-
- <property name="endDate" column="enddate"/>
-
- <property name="completed" not-null="true"/>
-
- <many-to-one name="patient" class="org.hisp.dhis.patient.Patient"
- column="patientid" not-null="true" foreign-key="fk_programinstance_patientid"/>
-
- <many-to-one name="program" class="org.hisp.dhis.program.Program"
- column="programid" not-null="true" foreign-key="fk_programinstance_programid"/>
-
+ <property name="dateOfIncident" column="dateofincident" not-null="true" />
+
+ <property name="enrollmentDate" column="enrollmentdate" not-null="true" />
+
+ <property name="endDate" column="enddate" />
+
+ <property name="completed" not-null="true" />
+
+ <many-to-one name="patient" class="org.hisp.dhis.patient.Patient" column="patientid" not-null="true"
+ foreign-key="fk_programinstance_patientid" />
+
+ <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">
- <key column="programinstanceid"/>
- <one-to-many class="org.hisp.dhis.program.ProgramStageInstance"/>
- </set>
-
- <set name="attributes" table="programinstance_attributes">
- <key column="programinstanceid" />
- <many-to-many class="org.hisp.dhis.program.ProgramAttribute"
- column="programattributeid" foreign-key="fk_program_programattributeid" />
- </set>
-
+ <key column="programinstanceid" />
+ <one-to-many class="org.hisp.dhis.program.ProgramStageInstance" />
+ </set>
+
+ <set name="attributes" table="programinstance_attributes">
+ <key column="programinstanceid" />
+ <many-to-many class="org.hisp.dhis.program.ProgramAttribute" column="programattributeid" foreign-key="fk_program_programattributeid" />
+ </set>
+
</class>
</hibernate-mapping>
=== 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 2010-08-31 14:34:31 +0000
+++ 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
@@ -4,27 +4,29 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.program.ProgramStage" table="programstage">
+ <class name="org.hisp.dhis.program.ProgramStage" table="programstage">
+
<id name="id" column="programstageid">
- <generator class="native"/>
- </id>
-
- <property name="name" not-null="true" unique="true" length="160"/>
-
- <property name="description"/>
-
- <property name="stageInProgram" column="stageinprogram"/>
-
- <property name="minDaysFromStart" column="mindaysfromstart"/>
-
- <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid" foreign-key="fk_programstage_program"/>
-
+ <generator class="native" />
+ </id>
+
+ <property name="name" not-null="true" unique="true" length="160" />
+
+ <property name="description" />
+
+ <property name="stageInProgram" column="stageinprogram" not-null="true" />
+
+ <property name="minDaysFromStart" column="mindaysfromstart" not-null="true" />
+
+ <many-to-one name="program" class="org.hisp.dhis.program.Program" column="programid" foreign-key="fk_programstage_program" />
+
<set name="programStageDataElements" inverse="true">
- <key column="programstageid"/>
+ <key column="programstageid" />
<one-to-many class="org.hisp.dhis.program.ProgramStageDataElement" />
- </set>
-
- <many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm" cascade="all" foreign-key="fk_programstage_dataentryform"/>
-
+ </set>
+
+ <many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm" cascade="all"
+ foreign-key="fk_programstage_dataentryform" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml 2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElement.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,15 +4,16 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.program.ProgramStageDataElement" table="programstage_dataelements">
- <composite-id>
- <key-many-to-one name="programStage" class="org.hisp.dhis.program.ProgramStage"
- column="programstageid" foreign-key="fk_programstagedataelement_programstageid"/>
- <key-many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement"
- column="dataelementid" foreign-key="fk_programstagedataelement_dataelementid"/>
- </composite-id>
-
- <property name="compulsory" column="compulsory" not-null="true"/>
-
+ <class name="org.hisp.dhis.program.ProgramStageDataElement" table="programstage_dataelements">
+
+ <composite-id>
+ <key-many-to-one name="programStage" class="org.hisp.dhis.program.ProgramStage" column="programstageid"
+ foreign-key="fk_programstagedataelement_programstageid" />
+ <key-many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement" column="dataelementid"
+ foreign-key="fk_programstagedataelement_dataelementid" />
+ </composite-id>
+
+ <property name="compulsory" column="compulsory" not-null="true" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElementValidation.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElementValidation.hbm.xml 2010-05-12 02:15:26 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageDataElementValidation.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,30 +4,27 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.program.ProgramStageDataElementValidation"
- table="programstage_dataelement_validation">
-
- <id name="id" column="programstagedevalidationid">
- <generator class="native" />
- </id>
-
- <property name="description" />
-
- <many-to-one name="leftProgramStageDataElement"
- class="org.hisp.dhis.program.ProgramStageDataElement" lazy="false"
- cascade="save-update">
- <column name="leftdataelementid" />
- <column name="leftprogramstageid" />
- </many-to-one>
-
- <many-to-one name="rightProgramStageDataElement"
- class="org.hisp.dhis.program.ProgramStageDataElement" lazy="false"
- cascade="save-update">
- <column name="rightdataelementid" />
- <column name="rightprogramstageid" />
- </many-to-one>
-
- <property name="operator" />
-
- </class>
+ <class name="org.hisp.dhis.program.ProgramStageDataElementValidation" table="programstage_dataelement_validation">
+
+ <id name="id" column="programstagedevalidationid">
+ <generator class="native" />
+ </id>
+
+ <property name="description" />
+
+ <many-to-one name="leftProgramStageDataElement" class="org.hisp.dhis.program.ProgramStageDataElement"
+ lazy="false" cascade="save-update">
+ <column name="leftdataelementid" />
+ <column name="leftprogramstageid" />
+ </many-to-one>
+
+ <many-to-one name="rightProgramStageDataElement" class="org.hisp.dhis.program.ProgramStageDataElement"
+ lazy="false" cascade="save-update">
+ <column name="rightdataelementid" />
+ <column name="rightprogramstageid" />
+ </many-to-one>
+
+ <property name="operator" not-null="true" />
+
+ </class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml 2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml 2011-04-12 13:44:50 +0000
@@ -5,24 +5,24 @@
<hibernate-mapping>
<class name="org.hisp.dhis.program.ProgramStageInstance" table="programstageinstance">
-
+
<id name="id" column="programstageinstanceid">
- <generator class="native"/>
- </id>
-
- <many-to-one name="programInstance" class="org.hisp.dhis.program.ProgramInstance"
- 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"/>
-
- <property name="stageInProgram" column="stageinprogram"/>
-
- <property name="dueDate" column="duedate"/>
-
- <property name="executionDate" column="executiondate"/>
-
- <property name="completed" not-null="true"/>
-
+ <generator class="native" />
+ </id>
+
+ <many-to-one name="programInstance" class="org.hisp.dhis.program.ProgramInstance" 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" />
+
+ <property name="stageInProgram" column="stageinprogram" not-null="true" />
+
+ <property name="dueDate" column="duedate" />
+
+ <property name="executionDate" column="executiondate" />
+
+ <property name="completed" not-null="true" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml 2010-11-09 02:09:53 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/programattributevalue/hibernate/ProgramAttributeValue.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,20 +4,19 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.programattributevalue.ProgramAttributeValue" table="programattributevalue">
-
- <composite-id>
- <key-many-to-one name="programAttribute" class="org.hisp.dhis.program.ProgramAttribute"
- column="programattributeid" foreign-key="fk_programattributevalue_programattributeid"/>
- <key-many-to-one name="programInstance" class="org.hisp.dhis.program.ProgramInstance"
- column="programinstanceid" foreign-key="fk_programattributevalue_programinstanceid"/>
- </composite-id>
-
- <property name="value"/>
-
- <many-to-one name="programAttributeOption"
- class="org.hisp.dhis.program.ProgramAttributeOption" column="programattributeoptionid"
- foreign-key="fk_programAttributeValue_programAttributeOption" />
-
+ <class name="org.hisp.dhis.programattributevalue.ProgramAttributeValue" table="programattributevalue">
+
+ <composite-id>
+ <key-many-to-one name="programAttribute" class="org.hisp.dhis.program.ProgramAttribute" column="programattributeid"
+ foreign-key="fk_programattributevalue_programattributeid" />
+ <key-many-to-one name="programInstance" class="org.hisp.dhis.program.ProgramInstance" column="programinstanceid"
+ foreign-key="fk_programattributevalue_programinstanceid" />
+ </composite-id>
+
+ <property name="value" />
+
+ <many-to-one name="programAttributeOption" class="org.hisp.dhis.program.ProgramAttributeOption" column="programattributeoptionid"
+ foreign-key="fk_programAttributeValue_programAttributeOption" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/Relationship.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/Relationship.hbm.xml 2009-12-01 07:54:54 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/Relationship.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,19 +4,20 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
- <class name="org.hisp.dhis.relationship.Relationship" table="relationship">
+ <class name="org.hisp.dhis.relationship.Relationship" table="relationship">
+
<id name="id" column="relationshipid">
- <generator class="native"/>
- </id>
-
- <many-to-one name="patientA" class="org.hisp.dhis.patient.Patient"
- column="patientaid" not-null="true" foreign-key="fk_relationship_patientida"/>
-
- <many-to-one name="relationshipType" class="org.hisp.dhis.relationship.RelationshipType"
- column="relationshiptypeid" not-null="true" foreign-key="fk_relationship_relationshiptypeid"/>
-
- <many-to-one name="patientB" class="org.hisp.dhis.patient.Patient"
- column="patientbid" not-null="true" foreign-key="fk_relationship_patientidb"/>
-
+ <generator class="native" />
+ </id>
+
+ <many-to-one name="patientA" class="org.hisp.dhis.patient.Patient" column="patientaid" not-null="true"
+ foreign-key="fk_relationship_patientida" />
+
+ <many-to-one name="relationshipType" class="org.hisp.dhis.relationship.RelationshipType" column="relationshiptypeid"
+ not-null="true" foreign-key="fk_relationship_relationshiptypeid" />
+
+ <many-to-one name="patientB" class="org.hisp.dhis.patient.Patient" column="patientbid" not-null="true"
+ foreign-key="fk_relationship_patientidb" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml 2009-11-05 07:15:36 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/relationship/hibernate/RelationshipType.hbm.xml 2011-04-12 13:44:50 +0000
@@ -4,19 +4,17 @@
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
-
<class name="org.hisp.dhis.relationship.RelationshipType" table="relationshiptype">
-
+
<id name="id" column="relationshiptypeid">
- <generator class="native"/>
- </id>
-
- <property name="aIsToB" column="a_is_to_b" not-null="true"/>
-
- <property name="bIsToA" column="b_is_to_a" not-null="true"/>
-
- <property name="description" type="text"/>
-
+ <generator class="native" />
+ </id>
+
+ <property name="aIsToB" column="a_is_to_b" not-null="true" />
+
+ <property name="bIsToA" column="b_is_to_a" not-null="true" />
+
+ <property name="description" type="text" />
+
</class>
-
</hibernate-mapping>