I had a response about this problem, and this due to HSQDLB itself, not
Hibernate neither OpenEJB.
Actually HSQLDB nevers use Java float internally, just doubles, so I should
define my properties as double instead of float.

Olivier

2008/11/6 Olivier THIERRY <[EMAIL PROTECTED]>

> Thanks for your response.
>
> I should have known this was a problem with JPA implementation since the
> problem is the same when using Hibernate console, and Open EJB is not
> involved in this case !
>
> Anyway I can't test with Open JPA because I use some specific Hibernate
> features. So I will ask my question on Hibernate forums and I will report
> here, I am sure it's something that could be useful for many people.
>
> Olivier
>
> 2008/11/5 David Blevins <[EMAIL PROTECTED]>
>
>
>> On Nov 4, 2008, at 7:52 AM, Olivier THIERRY wrote:
>>
>>  But it nevers returns any result, while I have no problem running the
>>> similar queries with string or int columns instead of float one ! So it's
>>> just a problem with floats. Moreover using Hibernate console, I could
>>> make
>>> it work but I had to set my parameter as a double. So it looks like I
>>> have a
>>> type mapping problem with floats between Java, JDBC and HSQLDB. For what
>>> I
>>> understood this type mapping is configured on the application server. In
>>> JBoss AS (the one I use in production), there's a file for this, called
>>> standardjbosscmp-jdbc.xml. It defines for each database product and each
>>> Java type the JDBC and SQL corresponding types. Do we have the equivalent
>>> with Open EJB ? Or is there something I misunderstood with JPA ? Please
>>> tell
>>> me if it's not a problem with Open EJB because I am not sure at all about
>>> this.
>>>
>>
>>
>> Type mapping is all handled by the JPA provider.  I'd double check with
>> Hibernate.
>>
>> I know OpenJPA and other JPA implementations have logic that adapts their
>> JDBC usage to match the dialect of the database and the capabilities of its
>> JDBC driver.  Pretty sure I've seen a similar property for Hibernate.
>>
>> One quick test might be to temporarily switch your JPA provider to say
>> OpenJPA, which is certified, and see how it handles the query.
>>
>> -David
>>
>>
>
>
> --
> Seules 2 choses sont infinies : l'univers et la bêtise humaine ; et encore
> pour l'univers, je ne suis pas sûr … (Einstein)
>

Reply via email to