← Back to team overview

dhis2-devs team mailing list archive

Re: Should we remove the Source object?

 

2009/8/26 Lars Helge Øverland <larshelge@xxxxxxxxx>

> Hi,
>
> I have been thinking about removing the Source object from the API.
> The abstract Source class was introduced in the model in order to
> allow for multiple implementations of Sources in the system. Currently
> we only have the OrganisationUnit object extending Source. We now see
> eg. with Abyot's CHIS module that even if we need a new kind of
> Source; the Patient, we still need the OrganisationUnit reference in
> DataValue.


I am not using it !


>
>
> The downsides of keeping Source are that it
>
> - Increases complexity.
> - Makes JDBC/Hibernate operations slower, since the Source table must
> be updated first, then the orgunit table.
> - Entails problems when people manually modifies the database (which
> they really should not) as they always forget to update the source
> table when adding/removing from the organisationunit table.
>
> The only database update this would require is to set the
> "organisationunitid" field in the "organisationunit" table to
> auto-increment. I believe Hibernate will take care of this.
>
> Based on this I opt for removing the Source object and moving the
> OrganisationUnit object into the core.
>
> Are there other aspects regarding this that should be mentioned? Any
> objections?
>
>
> regards
>
>
> Lars
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References