dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39391
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19938: Fixed hibernate mapping issue for PSI, key-many-to-one to many-to-one
------------------------------------------------------------
revno: 19938
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-09-02 16:18:36 +0200
message:
Fixed hibernate mapping issue for PSI, key-many-to-one to many-to-one
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.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-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2015-09-02 13:40:16 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstance.java 2015-09-02 14:18:36 +0000
@@ -62,6 +62,8 @@
private OrganisationUnit organisationUnit;
+ private DataElementCategoryOptionCombo attributeOptionCombo;
+
private List<OutboundSms> outboundSms = new ArrayList<>();
private List<MessageConversation> messageConversations = new ArrayList<>();
@@ -78,8 +80,6 @@
private Date completedDate;
- private DataElementCategoryOptionCombo attributeOptionCombo;
-
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -190,6 +190,16 @@
{
this.organisationUnit = organisationUnit;
}
+
+ public DataElementCategoryOptionCombo getAttributeOptionCombo()
+ {
+ return attributeOptionCombo;
+ }
+
+ public void setAttributeOptionCombo( DataElementCategoryOptionCombo attributeOptionCombo )
+ {
+ this.attributeOptionCombo = attributeOptionCombo;
+ }
public List<OutboundSms> getOutboundSms()
{
@@ -291,14 +301,4 @@
return EventStatus.SCHEDULE;
}
}
-
- public DataElementCategoryOptionCombo getAttributeOptionCombo()
- {
- return attributeOptionCombo;
- }
-
- public void setAttributeOptionCombo( DataElementCategoryOptionCombo attributeOptionCombo )
- {
- this.attributeOptionCombo = attributeOptionCombo;
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml 2015-09-02 13:48:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStageInstance.hbm.xml 2015-09-02 14:18:36 +0000
@@ -22,12 +22,13 @@
<many-to-one name="programStage" class="org.hisp.dhis.program.ProgramStage"
column="programstageid" not-null="true" foreign-key="fk_programstageinstance_programstageid" />
+ <many-to-one name="attributeOptionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo"
+ column="attributeoptioncomboid" foreign-key="fk_programstageinstance_attributeoptioncomboid" />
+
<property name="dueDate" column="duedate" />
<property name="executionDate" column="executiondate" type="timestamp" index="programstageinstance_executiondate" />
- <key-many-to-one name="attributeOptionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" column="attributeoptioncomboid" foreign-key="fk_programstageinstance_attributeoptioncomboid" />
-
<many-to-one name="organisationUnit"
class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"
foreign-key="fk_programstageinstance_organisationunitid" index="programstageinstance_organisationunitid" />