Hibernate version: 3.0
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: postgreSQL 8.0.3
The generated SQL (show_sql=true):
insert into groups (name,description,id) values (fooname, bar,1)
Debug level Hibernate log excerpt:
Hi,
I am a beginner and please help. Basically I have a very table "groups", which has 3 columns: id: au auto-generated sequence; name: char; description: char.
and when I try to insert a row with name's value "fooname", description's value "bar", I see from the log that hibernate generates the above sql without quotes around the string literals for the columns name and description. As a result I got GrammarException.
When I take that sql to postgres and manually run it, it fails also.
I added quotes around fooname and bar, then it succeeds - that is the correct sql syntax.
Why does the hibernate not surround string literals with quotes? is there a setting something I can configure?
Thanks for help!
lwen
|