← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14965: R. 14962, no change code style

 

------------------------------------------------------------
revno: 14965
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-04-24 22:03:06 +0800
message:
  R. 14962, no change code style
modified:
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java


--
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/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-04-24 13:36:33 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-04-24 14:03:06 +0000
@@ -529,8 +529,8 @@
 
                 if ( attribute.isUnique() )
                 {
-
                     Criteria criteria = getCriteria();
+                    criteria.add( Restrictions.ne( "id", instance.getId() ) );
                     criteria.createAlias( "attributeValues", "attributeValue" );
                     criteria.createAlias( "attributeValue.attribute", "attribute" );
                     criteria.add( Restrictions.eq( "attributeValue.value", attributeValue.getValue() ) );