<?xml version="1.0"?>
<!--
/**
 * 
 * OLAT - Online Learning and Testing
 * 
 * This source code is protected by the General Public License (GPL)
 *
 * Copyright (c) 1999 - 2002 OLAT-Zentrum
 * University Zuerich, Switzerland
 *
 * @version $Revision: 1.5 $ 
 * Initial Date:  07.08.2003
 * Last modified: $Date: 2006/02/02 16:31:25 $
 *
 * @author Florian Gnaegi
 *
 */
-->
<!DOCTYPE hibernate-mapping PUBLIC 
        "-//Hibernate/Hibernate Mapping DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
  <class name="org.olat.ims.qti.QTIResultSet" 
  		table="o_qtiresultset">
  
    <id name="key" column="resultset_id" type="long" unsaved-value="null">
      <generator class="hilo"/>
    </id>

    <timestamp name="lastModified" column="lastmodified" />   
  	<property  name="creationDate" column="creationdate" type="timestamp" />   
   
	<many-to-one name="identity" class="org.olat.basesecurity.IdentityImpl" cascade="none" outer-join="true"> 
		<column name="identity_id" not-null="true" /> 
	</many-to-one>
	
	<property name="olatResource">
			<column name="olatresource_fk" not-null="true" index="oresindex" /> 
    </property>
    
    <property name="olatResourceDetail">
			<column name="olatresourcedetail" not-null="true" index="oresdetindex" /> 
    </property>
    <property name="assessmentID">
			<column name="assessmentid" not-null="true" index="assindex" /> 
    </property>
    <property name="repositoryRef">
			<column name="repositoryref_fk" not-null="true" index="reprefindex" /> 
    </property>
    <property name="isPassed">
			<column name="ispassed" not-null="false" /> 
    </property>
    
    <property name="score">
			<column name="score" not-null="false" sql-type="DECIMAL(65,30)" /> 
    </property>
    
    <property name="duration">
			<column name="duration" not-null="false"/> 
    </property>

  </class>  
</hibernate-mapping>

