-->
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: Hibernate with PostgreSQL - Missing quotes for string fields
PostPosted: Sat Jun 06, 2009 1:47 am 
Newbie

Joined: Mon Aug 25, 2008 11:18 am
Posts: 5
Hello,
I'm trying to use Hibernate Entity Manager with PostgreSQL. I have a POJO which I want to persist. Hibernate sends to the database the query:
Code:
insert into products (unit_price, product_name, product_id) values (5.2, Test1, 79)

The problem is that the product_name field is of type "character varying", which means the value specified must be encompassed by quotes, but Hibernate does not use them, which causes the query to fail.

How can I make Hibernate include the missing quotes?
Thanks.


Top
 Profile  
 
 Post subject: Re: Hibernate with PostgreSQL - Missing quotes for string fields
PostPosted: Sat Jun 06, 2009 6:50 pm 
Beginner
Beginner

Joined: Mon Jun 01, 2009 5:39 am
Posts: 34
What is the mapping file for this table?


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.