-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.5 formula
PostPosted: Mon Jun 18, 2012 2:33 am 
Newbie

Joined: Mon Apr 26, 2010 10:18 pm
Posts: 2
Hi,

I upgraded from hibernate 3.2 to hibernate-core 3.5, and I had an issue with the formula used in my hbm file.
I use org.hibernate.dialect.PostgreSQLDialect.

When using hibernate 3.2 I had a formula like this:
Code:
<formula>
            <![CDATA[
            (           -- Select the number of employment session
                        SELECT COUNT (*)
                        FROM employee_employment_sessions es
                        WHERE es.id = employeeid
            )
            ]]>
            </formula>


But when upgrading to 3.56 this formula doesn't work.
I found the issue, first I though it was the comment, because when generating the SQL the comment become -- employee_.Select employee_.the employee_.number ...
But actually the issue come from the count, there is a white space between count and ( so when generating the SQL the request become SELECT employee_.COUNT (*) and so it can't be executed.
Is it a bug in hibernate 3.5 or is a normal?

Now I have to check all my formula and see it there is not a bad white space somewhere.

Cheers,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.