ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oci <zarbi...@hotmail.com>
Subject Problem with Complex Property
Date Mon, 30 Apr 2007 09:22:34 GMT

I have a problem while using complex properties. Here is my code :

<resultMap id="Utilisateur.map" 
		<result property="id" column="id" />
		<result property="login" column="login"/>
		<result property="password" column="password"/>
		<result property="nom" column="nom"/>
		<result property="prenom" column="prenom"/>
		<result property="dateCreation" column="dateCreation"/>
		<result property="dateLastModif" column="dateLastModif"/>
		<result property="dateLastConnec" column="dateLastConnec"/>
		<result property="idEan" column="idEan" select="Ean.getOne"/>
		<result property="idProfil" column="idProfil"
		<result property="idLangue" column="idLangue" select="Langue.getOne"/>

<resultMap id="ProfilUtilisateur.map" class="ProfilUtilisateur.classe">
		<result property="id" column="id"/>
		<result property="profil" column="profil"/>
		<result property="droits" column="droits"/>

<select id="ProfilUtilisateur.getOne" resultMap="ProfilUtilisateur.map">
		SELECT id, profil, droits
		FROM profilutilisateur
		WHERE id=#value#

<select id="Utilisateur.getAllProfils" resultMap="ProfilUtilisateur.map"
		FROM utilisateur
		<dynamic prepend="WHERE">	
		     <isNotEmpty prepend="AND" property="idEan">		
		     <isNotEmpty prepend="AND" property="dateCreation">		

While using Utilisateur.getAllProfils i get this error :
SqlMapClient operation; bad SQL grammar []; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred
in profilsutilisateurs-mysql.xml. --- The error occurred while applying a
result map. --- Check the ProfilUtilisateur.map. --- Check the result
mapping for the 'id' property. --- Cause: java.sql.SQLException: Column 'id'
not found. Caused by: java.sql.SQLException: Column 'id' not found. 

I really don't know what is the problem. Please help me.
View this message in context: http://www.nabble.com/Problem-with-Complex-Property-tf3668669.html#a10250587
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message