<?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.7 $ 
 * 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.QTIResult" table="o_qtiresult">
  
    <id name="key" column="result_id" type="long" unsaved-value="null">
      <generator class="hilo"/>
    </id>
    
    <timestamp name="lastModified" column="lastmodified" />   
  	<property  name="creationDate" column="creationdate" type="timestamp" />   
 
    <property name="itemIdent">
			<column name="itemident" not-null="true" index="itemindex"/> 
    </property>
    <property name="answer">
			<column name="answer" not-null="false" sql-type="text"/> 
    </property>
    
    <property name="duration">
			<column name="duration" not-null="false"/> 
    </property>
    
    <property name="score">
			<column name="score" not-null="false" sql-type="DECIMAL(65,30)"/> 
    </property>

    <property name="tstamp">
			<column name="tstamp" not-null="true"/> 
    </property>
    <property name="ip">
			<column name="ip" not-null="false"/> 
    </property>
   	<many-to-one name="resultSet" class="org.olat.ims.qti.QTIResultSet" column="resultset_fk" cascade="none"/>

  </class>  
</hibernate-mapping>

