-->
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 is not generating proper queries with MySQL
PostPosted: Fri Sep 25, 2009 12:17 am 
Newbie

Joined: Fri Sep 25, 2009 12:13 am
Posts: 1
I am changing configuration of hibernate 3.0 from MSSQL to MySQL. This is done but Hibernate is not generating proper queries for MySQL. I have also updated my configuration file with MySql dialect and Mysql jdbc connector. The problem i am facing here is --

I have one table only with PK with one more column(FK of other table). Now while inserting data in that table it is generating query like --

insert in to table_name default values

This query works for MSSql but not with MySQL. Please let me know any solution for this. How the Hibernate will generate right query for MySQL?


Top
 Profile  
 
 Post subject: Re: Hibernate is not generating proper queries with MySQL
PostPosted: Fri Sep 25, 2009 10:30 am 
Beginner
Beginner

Joined: Wed Jul 09, 2008 5:34 am
Posts: 41
Location: Brno, Czech Republic
What's the version of MySQL you are using? What's the storage engine (MyISAM, InnoDB, ...)? What's the dialect you are using? Can you post the full query that Hibernate is generating (see the "show_sql" option).


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.