://apache-wicket.1842946.n4.nabble.com/SQL-Query-casting-objects-tp3081312p3224855.html
Sent from the Users forum mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands
SQLQuery.addEntity(Class entityClass).list()
http://docs.jboss.org/hibernate/core/3.3/api/org/hibernate/class-use/SQLQuery.html
-Original Message-
From: Henrique Boregio [mailto:hbore...@gmail.com]
Sent: Friday, December 10, 2010 3:40 AM
To: users@wicket.apache.org
Subject: SQL Query
Thanks, I'll give it a shot!
On Thu, Dec 9, 2010 at 11:39 PM, Henrique Boregio hbore...@gmail.com wrote:
I have an SQL query to do a full-text search on my database:
String sql = SELECT * FROM Items WHERE MATCH (title, description)
AGAINST (' + searchText + ');;
List items =
I have an SQL query to do a full-text search on my database:
String sql = SELECT * FROM Items WHERE MATCH (title, description)
AGAINST (' + searchText + ');;
List items = session.createSQLQuery(sql).list();
When I execute it, it returns a list with the rows it found as a result.
Each row is