# \[Branch ~dhis2-devs-core/dhis2/trunk\] Rev 19664: minor fix, turn of lazy for a few PI properties that we always access (using AbstractEnrollmentSe...

**URL:** <https://community.dhis2.org/t/branch-dhis2-devs-core-dhis2-trunk-rev-19664-minor-fix-turn-of-lazy-for-a-few-pi-properties-that-we-always-access-using-abstractenrollmentse/29617>\
**Category:** Support - Assistance technique\
**Created:** [16 July 2015 04:57 UTC](https://community.dhis2.org/t/branch-dhis2-devs-core-dhis2-trunk-rev-19664-minor-fix-turn-of-lazy-for-a-few-pi-properties-that-we-always-access-using-abstractenrollmentse/29617 "2015-07-16T04:57:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DHIS\_2\_Users](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@DHIS\_2\_Users](https://community.dhis2.org/u/DHIS_2_Users)\
**Post date:** [16 July 2015 04:57 UTC](https://community.dhis2.org/t/branch-dhis2-devs-core-dhis2-trunk-rev-19664-minor-fix-turn-of-lazy-for-a-few-pi-properties-that-we-always-access-using-abstractenrollmentse/29617/1 "2015-07-16T04:57:27Z")

</div>

[revision-diff.txt](https://dhis2.b-cdn.net/uploads/default/original/3X/2/1/21f14df99a23aa5c9444ba588464ec6660a82b07.txt) (2.47 KB)

---

<div class="post-metadata">

**Author:** ![Calle\_Hedberg](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/calle_hedberg/32/33875_2.png) [@Calle\_Hedberg](https://community.dhis2.org/u/Calle_Hedberg)\
**Post date:** [16 July 2015 05:13 UTC](https://community.dhis2.org/t/branch-dhis2-devs-core-dhis2-trunk-rev-19664-minor-fix-turn-of-lazy-for-a-few-pi-properties-that-we-always-access-using-abstractenrollmentse/29617/2 "2015-07-16T05:13:45Z")

</div>

Morten

Since u are making many minor corrections. Can u pls also remove the 230 character constraint for attribute values in the UI? Db is OK (type text) but ui limit was never removed. I find that I cannot save almost any DE or indicator without truncating the additional def fields added as attributes.

Regards

Calle

> **···**
>
> On 16 Jul 2015 06:57, [noreply@launchpad.net](mailto:noreply@launchpad.net) wrote:
> 
> > * * *
> > 
> > revno: 19664
> > 
> > committer: Morten Olav Hansen [mortenoh@gmail.com](mailto:mortenoh@gmail.com)
> > 
> > branch nick: dhis2
> > 
> > timestamp: Thu 2015-07-16 11:56:40 +0700
> > 
> > message:
> > 
> > minor fix, turn of lazy for a few PI properties that we always access (using AbstractEnrollmentService.getEnrollment), speeds up most PI queries
> > 
> > modified:
> > 
> > dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml
> > 
> > –
> > 
> > lp:dhis2
> > 
> > [https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk](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](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/program/hibernate/ProgramInstance.hbm.xml’
> > 
> > — dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2015-06-23 15:59:19 +0000
> > 
> > +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2015-07-16 04:56:40 +0000
> > 
> > @@ -16,11 +16,9 @@
> > 
> > ```
> > <property name="lastUpdated" type="timestamp" />
> > 
> > ```
> > 
> > - \<property name=“dateOfIncident” column=“dateofincident”
> > 
> > - 
> > 
> > ```
> > not-null="true" />
> > 
> > ```
> > 
> > - 
> > 
> > - \<property name=“enrollmentDate” column=“enrollmentdate”
> > 
> > - 
> > 
> > ```
> > not-null="true" />
> > 
> > ```
> > 
> > - 
> > 
> > @@ -30,10 +28,10 @@
> > 
> > ```
> > <many-to-one name="entityInstance"
> > 
> > class="org.hisp.dhis.trackedentity.TrackedEntityInstance" column="trackedentityinstanceid"
> > 
> > ```
> > 
> > - 
> > 
> > ```
> > foreign-key="fk_programinstance_trackedentityinstanceid" />
> > 
> > ```
> > 
> > - 
> > 
> > ```
> > foreign-key="fk_programinstance_trackedentityinstanceid" lazy="false" />
> > 
> > ```
> > 
> > \<many-to-one name=“program” class=“org.hisp.dhis.program.Program”
> > 
> > - 
> > 
> > ```
> > column="programid" not-null="true" foreign-key="fk_programinstance_programid" />
> > 
> > ```
> > 
> > - 
> > 
> > ```
> > column="programid" not-null="true" foreign-key="fk_programinstance_programid" lazy="false" />
> > 
> > ```
> > 
> > ```
> > <key column="programinstanceid" />
> > 
> > ```
> > 
> > @@ -54,14 +52,14 @@
> > 
> > ```
> > column="messageconversationid" />
> > 
> > </list>
> > 
> > ```
> > 
> > - 
> > 
> > - \<many-to-one name=“organisationUnit” class=“org.hisp.dhis.organisationunit.OrganisationUnit” column=“organisationunitid”
> > 
> > - 
> > 
> > ```
> > foreign-key="fk_programinstance_organisationunitid" not-null="false" />
> > 
> > ```
> > 
> > - 
> > 
> > ```
> > foreign-key="fk_programinstance_organisationunitid" not-null="false" lazy="false" />
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [16 July 2015 05:27 UTC](https://community.dhis2.org/t/branch-dhis2-devs-core-dhis2-trunk-rev-19664-minor-fix-turn-of-lazy-for-a-few-pi-properties-that-we-always-access-using-abstractenrollmentse/29617/3 "2015-07-16T05:27:18Z")

</div>

Done

> **···**
>
> On Thu, Jul 16, 2015 at 12:13 PM, Calle Hedberg [calle.hedberg@gmail.com](mailto:calle.hedberg@gmail.com) wrote:
> 
> > Morten
> > 
> > Since u are making many minor corrections. Can u pls also remove the 230 character constraint for attribute values in the UI? Db is OK (type text) but ui limit was never removed. I find that I cannot save almost any DE or indicator without truncating the additional def fields added as attributes.
> 
> > Regards
> > 
> > Calle
> 
> > On 16 Jul 2015 06:57, [noreply@launchpad.net](mailto:noreply@launchpad.net) wrote:
> 
> > > * * *
> > > 
> > > revno: 19664
> > > 
> > > committer: Morten Olav Hansen [mortenoh@gmail.com](mailto:mortenoh@gmail.com)
> > > 
> > > branch nick: dhis2
> > > 
> > > timestamp: Thu 2015-07-16 11:56:40 +0700
> > > 
> > > message:
> > > 
> > > minor fix, turn of lazy for a few PI properties that we always access (using AbstractEnrollmentService.getEnrollment), speeds up most PI queries
> > > 
> > > modified:
> > > 
> > > dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml
> > > 
> > > –
> > > 
> > > lp:dhis2
> > > 
> > > [https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk](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](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/program/hibernate/ProgramInstance.hbm.xml’
> > > 
> > > — dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2015-06-23 15:59:19 +0000
> > > 
> > > +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/program/hibernate/ProgramInstance.hbm.xml 2015-07-16 04:56:40 +0000
> > > 
> > > @@ -16,11 +16,9 @@
> > > 
> > > ```
> > > <property name="lastUpdated" type="timestamp" />
> > > 
> > > ```
> > > 
> > > - \<property name=“dateOfIncident” column=“dateofincident”
> > > 
> > > - 
> > > 
> > > ```
> > > not-null="true" />
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > - \<property name=“enrollmentDate” column=“enrollmentdate”
> > > 
> > > - 
> > > 
> > > ```
> > > not-null="true" />
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > @@ -30,10 +28,10 @@
> > > 
> > > ```
> > > <many-to-one name="entityInstance"
> > > 
> > > class="org.hisp.dhis.trackedentity.TrackedEntityInstance" column="trackedentityinstanceid"
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > ```
> > > foreign-key="fk_programinstance_trackedentityinstanceid" />
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > ```
> > > foreign-key="fk_programinstance_trackedentityinstanceid" lazy="false" />
> > > 
> > > ```
> > > 
> > > \<many-to-one name=“program” class=“org.hisp.dhis.program.Program”
> > > 
> > > - 
> > > 
> > > ```
> > > column="programid" not-null="true" foreign-key="fk_programinstance_programid" />
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > ```
> > > column="programid" not-null="true" foreign-key="fk_programinstance_programid" lazy="false" />
> > > 
> > > ```
> > > 
> > > ```
> > > <key column="programinstanceid" />
> > > 
> > > ```
> > > 
> > > @@ -54,14 +52,14 @@
> > > 
> > > ```
> > > column="messageconversationid" />
> > > 
> > > </list>
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > - \<many-to-one name=“organisationUnit” class=“org.hisp.dhis.organisationunit.OrganisationUnit” column=“organisationunitid”
> > > 
> > > - 
> > > 
> > > ```
> > > foreign-key="fk_programinstance_organisationunitid" not-null="false" />
> > > 
> > > ```
> > > 
> > > - 
> > > 
> > > ```
> > > foreign-key="fk_programinstance_organisationunitid" not-null="false" lazy="false" />
> > > 
> > > ```
