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

« back to all changes in this revision

Viewing changes to dhis-2/dhis-services/dhis-service-user-hibernate/src/main/resources/org/hisp/dhis/user/hibernate/User.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
 
3
  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
 
4
  "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
 
5
 
 
6
<hibernate-mapping>
 
7
  <class name="org.hisp.dhis.user.User" table="userinfo">
 
8
 
 
9
    <cache usage="read-write"/>
 
10
 
 
11
    <id name="id" column="userinfoid">
 
12
      <generator class="native"/>
 
13
    </id>
 
14
 
 
15
    <property name="surname">
 
16
      <column name="surname" not-null="true" length="160"/>
 
17
    </property>
 
18
    
 
19
    <property name="firstName">
 
20
      <column name="firstname" not-null="true" length="160"/>
 
21
    </property>
 
22
     
 
23
    <property name="email">
 
24
      <column name="email" length="160"/>
 
25
    </property>
 
26
        
 
27
          <set name="organisationUnits" table="usermembership">
 
28
      <key column="userinfoid"/>
 
29
      <many-to-many class="org.hisp.dhis.organisationunit.OrganisationUnit" 
 
30
        column="organisationunitid" foreign-key="fk_userinfo_organisationunitid"/>
 
31
    </set>
 
32
                  
 
33
  </class>
 
34
</hibernate-mapping>