-->
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.  [ 2 posts ] 
Author Message
 Post subject: Query list problem
PostPosted: Thu May 03, 2007 12:33 pm 
Newbie

Joined: Wed May 02, 2007 6:37 am
Posts: 6
Hi All,

I am haing a few problems with a basic query and printing a list to freemarker.

Code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
    session =sessionFactory.openSession(); 

        String SQL_QUERY = "from T1 AS t1, T2 AS t2 where t1.xxx='value' and t2.yyy='value'";

        Query query = session.createQuery(SQL_QUERY);
        result = query.list();



This result could be more than one. I need to print this using freemaker

Code:
<table ><tr>>DEMO</th>
      <#list result as r>
<tr><td>${r.column}<#if r_has_next></#if>
      </#list>
</table>



However, it refused to print the entry. Any suggestions?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 6:04 am 
Senior
Senior

Joined: Sat Apr 21, 2007 11:01 pm
Posts: 144
https://sourceforge.net/forum/forum.php?forum_id=2346

_________________
Everytime you get an answer to your question without giving credit; god kills a kitten. :(


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

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.