Code:
@SuppressWarnings("unchecked")
   public List<Foto> getGaleria(Long idImovel) {
      
      return session.createSQLQuery("select nome, url_foto from Foto where imovel_id_imovel = :id")
      .setParameter("id", idImovel).list();
      }
Code:
Hibernate: 
    select
        nome,
        url_foto 
    from
        Foto 
    where
        imovel_id_imovel = ?
Code:
result.include("photo", fotoDAO.getGaleria(idImovel));
Code:
<fieldset>
  <table>
       <tr>    
          <td>Nome</td>
          <td>url</td>
       </tr>      
      <tr> 
   <c:forEach var="image" items="${photoList}">  
      <tr>
          <td>${image.nome}</td>  
          <td>${image.urlFoto}</td>  
   </c:forEach> 
      </tr>
 </table>
</fieldset>
The result is nothing:
