<?xml version="1.0" encoding="UTF-8" ?> 
 
<!DOCTYPE sqlMap 
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 
    "http://ibatis.apache.org/dtd/sql-map-2.dtd"> 
 

<sqlMap namespace="Cv"> 
    
  <typeAlias alias="Cv"
        type="org.gmod.schema.cv.Cv"/>

  <resultMap id="select-cv" 
               class="Cv">
    <result property="cvId"    column="cv_id"/>           
    <result property="name"    column="name"/>
    <result property="definition" column="definition"/>
  </resultMap>
  
  <select id="selectCv" resultMap="select-cv">
    SELECT * FROM cv WHERE cv_id=$cvId$
  </select>
  
  <select id="getCvByName" resultMap="select-cv">
    SELECT * FROM cv WHERE name=#value#
  </select>
	
  <select id="getAllCvs" resultMap="select-cv">
    SELECT * FROM cv
  </select>
  
</sqlMap>