~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/datavalue/hibernate/DataValue.hbm.xml

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 
3
  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
4
 
 
5
<hibernate-mapping>
 
6
  <class name="org.hisp.dhis.datavalue.DataValue" table="datavalue">
 
7
    <composite-id>
 
8
      <key-many-to-one name="dataElement" class="org.hisp.dhis.dataelement.DataElement"
 
9
          column="dataelementid" foreign-key="fk_datavalue_dataelementid"/>
 
10
      <key-many-to-one name="period" class="org.hisp.dhis.period.Period" 
 
11
          column="periodid" foreign-key="fk_datavalue_periodid"/>
 
12
      <!--
 
13
        The source relationship is made not lazy so that Hibernate won't put a
 
14
        proxy on the reference which cannot be casted to the desired subclass.
 
15
      -->
 
16
      <key-many-to-one name="source" class="org.hisp.dhis.source.Source" lazy="false"
 
17
          column="sourceid" foreign-key="fk_datavalue_sourceid"/>
 
18
            <key-many-to-one name="optionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" 
 
19
          column="categoryoptioncomboid" foreign-key="fk_datavalue_categoryoptioncomboid"/>
 
20
                
 
21
    </composite-id>
 
22
    <property name="value"/>
 
23
    <property name="storedBy" column="storedby" length="31"/>
 
24
    <property name="timestamp" column="lastupdated" type="date"/>
 
25
    <property name="comment" length="360"/>
 
26
  </class>
 
27
</hibernate-mapping>