dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14064
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4628: made attributevalues on DE/I/OU/U unique, also made AttributeValue.Attribute not-null
------------------------------------------------------------
revno: 4628
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-09-21 16:43:36 +0200
message:
made attributevalues on DE/I/OU/U unique, also made AttributeValue.Attribute not-null
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/AttributeValue.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.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-core/src/main/resources/org/hisp/dhis/attribute/hibernate/AttributeValue.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/AttributeValue.hbm.xml 2011-09-21 12:46:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/attribute/hibernate/AttributeValue.hbm.xml 2011-09-21 14:43:36 +0000
@@ -15,7 +15,7 @@
<property name="value" />
<many-to-one name="attribute" class="org.hisp.dhis.attribute.Attribute" column="attributeid"
- foreign-key="fk_attributevalue_attributeid" />
+ foreign-key="fk_attributevalue_attributeid" not-null="true" />
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2011-09-08 15:28:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElement.hbm.xml 2011-09-21 14:43:36 +0000
@@ -80,7 +80,7 @@
<set name="attributeValues" table="dataelementattributevalues">
<cache usage="read-write" />
<key column="dataelementid" />
- <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" />
+ <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" unique="true" />
</set>
</class>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2011-09-06 11:52:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/indicator/hibernate/Indicator.hbm.xml 2011-09-21 14:43:36 +0000
@@ -74,7 +74,7 @@
<set name="attributeValues" table="indicatorattributevalues">
<cache usage="read-write" />
<key column="indicatorid" />
- <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" />
+ <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" unique="true"/>
</set>
</class>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2011-09-06 11:52:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml 2011-09-21 14:43:36 +0000
@@ -92,7 +92,7 @@
<set name="attributeValues" table="organisationunitattributevalues">
<cache usage="read-write" />
<key column="organisationunitid" />
- <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" />
+ <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" unique="true" />
</set>
</class>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml 2011-09-21 12:46:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml 2011-09-21 14:43:36 +0000
@@ -34,8 +34,8 @@
<set name="attributeValues" table="userattributevalues">
<cache usage="read-write" />
<key column="userinfoid" />
- <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" />
- </set>
+ <many-to-many class="org.hisp.dhis.attribute.AttributeValue" column="attributevalueid" unique="true" />
+ </set>
</class>
</hibernate-mapping>