-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bug when showing objects with Hibernate
PostPosted: Sun May 16, 2010 4:19 pm 
Beginner
Beginner

Joined: Sat Oct 03, 2009 1:51 pm
Posts: 26
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:
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.