Hello i have this HQL request and i have an error when I run it
My function:
public ProprietaireInt getProprietaireInt(String codeImmeuble, String annee) {
//Create connexion
Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
ProprietaireInt proprietaireInt = new ProprietaireInt();
try{
String query = "SELECT pi.siren,pi.codeSCI,pi.libSocieteInterne,pi.libSocieteNormalise,pi.codeDomainePilotage " +
"FROM ImmeubleFisc if" +
"JOIN proprietaireInt pi ON if.sirenProprietaire = pi.siren " +
"WHERE if.idImmeubleFisc.codeImmeuble = :codeImmeuble " +
"AND if.idImmeubleFisc.exerciceFiscal = :annee";
Query q = null;
q = session.createQuery(query);
q.setString("codeImmeuble", codeImmeuble);
q.setString("annee", annee);
proprietaireInt = (ProprietaireInt) q.uniqueResult();
session.flush();
}
catch (Exception e)
{
System.out.println(e.getMessage()+" "+e.getStackTrace());
}
return proprietaireInt;
}
My errror :
2010-08-02 12:12:22,081 ERROR ast.ErrorCounter (ErrorCounter.java:33) - line 1:156: unexpected token: proprietaireInt