Has anyone come across the following problem in JPA/Hibernate/Spring:
I have a persisted instance of a class MyClass which contains a Float instance variable, f, mapped to a database FLOAT type (either Oracle or H2). The value of f is 123.456.
I execute the following code:
Which prints "1" when run with an Oracle database (which is what I would expect), but "0" with H2.
What's more, on H2, when I remove the ROUND function and just query on "myClass.f = ?1" I get one result as expected, which suggests ROUND is the problem. But also when I leave ROUND there, and hardcode the parameter ?1 as "123.456" I also get one result, which suggests it's the setting of the parameter that's the problem!!!
Can anyone enlighten me as to what's going wrong here?
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads