Hi All,
I've just started workign with Hibernate and have run into something
which looks like it used to have a (partial) solution to at:
http://forum.hibernate.org/viewtopic.php?t=463&highlight=createsqlquery

Which shows the following :

"Query q = session.createSQLQuery( "select {e}.empno as {e.empno},
{e}.firstnme as {e.firstnme}, {e}.lastname as {e.lastname} from employee
{e}", "e", Employee.class );"

I haven't been able to find this method in the current javadocs at
http://www.hibernate.org/hib_docs/api/net/sf/hibernate/Session.html 

At the above link - it's possible to execute SQL directly using a
createSQLQuery method, what I'd like to do is to do an insert based on a
String value, for example, if I had a DB table with columns long [id],
coulmn_1[char[10]], and column_2[char[10]], that I could do a direct 

"INSERT INTO tdb_table (column_1) VALUES ('hello');"
Where 'column_1' would be a parameter, or even better still is there
hsql available to do an insert?

I've checked the documentation
(http://www.hibernate.org/hib_docs/reference/pdf/hibernate_reference.pdf
) and couldn't find anythign referencing inserts apart from via object
setting.

Another issue I can see, is if this is possible, is what effect does
running SQL statements have on the hibernate cache, is it possible to
let hibernate know it's cache is out of date?


Any help is greatly appreciated, 

Thanks,
Oisin

Oisin Kim

Aurium
Tel: +353 1 6611132
Fax: +353 1 6615200
e-mail: [EMAIL PROTECTED]
web site: http://www.aurium.net 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to