hello i have an error when i execute a request with hibernate
ERROR ast.ErrorCounter (ErrorCounter.java:33) - line 1:22: expecting IDENT, found '*'
my dao:
public List rechercheValeurTarifs() throws Exception {
List tarifs = null;
try{
tarifs = getHibernateTemplate().find("SELECT FE_TARIF_IDF.* " +
"FROM FE_TARIF_IDF " +
"WHERE FE_TARIF_IDF.D_ANNEE in (SELECT MAX (FE_EXERCICE_FISCAL.D_CEXER) FROM FE_EXERCICE_FISCAL);");
if(tarifs == null)
{
tarifs = getHibernateTemplate().find("SELECT FE_TARIF_IDF.* " +
"FROM FE_TARIF_IDF " +
"WHERE FE_TARIF_IDF.D_ANNEE in (SELECT MAX (FE_EXERCICE_FISCAL.D_CEXER-1) FROM FE_EXERCICE_FISCAL);");
}
} catch (Exception e){
System.out.println(e.getStackTrace());
}
return tarifs;
}
my hbm.xml file:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="xx.xxx.xxx.persistance.bo" >
<class name="Tarifs" table="FE_TARIF_IDF" >
<cache usage="read-write" />
<composite-id name="idTarif" class="IdTarif">
<key-property name="annee" type="string" length="4" >
<column name="D_ANNE" />
</key-property>
<key-property name="zone" type="int" length="1" >
<column name="D_NZONE" />
</key-property>
<key-property name="typeLocal" type="string" length="1" >
<column name="D_CTYPE_LOCAL" />
</key-property>
</composite-id>
<property name="tarifNormal" type="float" column="D_NTARIF_NORMAL" length="7"/>
<property name="tarifReduit" type="float" column="D_NTARIF_REDUIT" length="7"/>
<property name="surfaceMin" type="float" column="D_NSURFACEMIN" length="10"/>
</class>
</hibernate-mapping>