Float on Hibernate InformixDialect
Posted in 2006
Topics: Installation, Setup & Upgrades, Java & JDBC Development, Third-Party Tools & Monitoring
Hi, I am trying to install an application that use Hibernate as RO persistence. To create the tables, the application use the mapping of types of hibernate. When I execute it, hibernate tries to create a double that does not exist on Informix. I think this is a bug on InformixDialect class ( see http://www.koders.com/java/fid5D5E8B3F3A06C97ADEF4EB967448690F51675C5A.aspx ). Does anyone knows a way to fix this ? Changing and recompiling InformixDialect class works but I cannot do it because my customer want the Hibernate jar that comes with the application distribution :-( . Thanks S'rgio Ferreira
hum.. could work...if V >= 9.x create distinct type double as float; Superboer. sergio@moredata.pt schreef: > Hi, > > I am trying to install an application that use Hibernate as RO persistence. > > To create the tables, the application use the mapping of types of hibernate. > > When I execute it, hibernate tries to create a double that does not exist > on Informix. > > I think this is a bug on InformixDialect class ( see > http://www.koders.com/java/fid5D5E8B3F3A06C97ADEF4EB967448690F51675C5A.aspx > ). > > Does anyone knows a way to fix this ? > > Changing and recompiling InformixDialect class works but I cannot do it > because my customer want the Hibernate jar that comes with the application > distribution :-( . > > Thanks > Sérgio Ferreira
Thanks Superboer. Good idea. I tried and "created the type without errors" but when I create the table it does not recognize the double. Am I doing something wrong ? S'rgio > hum.. > > could work...if V >= 9.x > > create distinct type double as float; > > Superboer. > > > > sergio@moredata.pt schreef: > >> Hi, >> >> I am trying to install an application that use Hibernate as RO >> persistence. >> >> To create the tables, the application use the mapping of types of >> hibernate. >> >> When I execute it, hibernate tries to create a double that does not >> exist >> on Informix. >> >> I think this is a bug on InformixDialect class ( see >> http://www.koders.com/java/fid5D5E8B3F3A06C97ADEF4EB967448690F51675C5A.aspx >> ). >> >> Does anyone knows a way to fix this ? >> >> Changing and recompiling InformixDialect class works but I cannot do it >> because my customer want the Hibernate jar that comes with the >> application >> distribution :-( . >> >> Thanks >> S'rgio Ferreira > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list > >
sergio@moredata.pt wrote:
> Thanks Superboer. Good idea.
> I tried and "created the type without errors" but when I create the table
> it does not recognize the double.
> Am I doing something wrong ?
>
> S'rgio
>
>> hum..
>>
>> could work...if V >= 9.x
>>
>> create distinct type double as float;
>>
>> Superboer.
>>
>>
>>
>> sergio@moredata.pt schreef:
>>
>>> Hi,
>>>
>>> I am trying to install an application that use Hibernate as RO
>>> persistence.
>>>
>>> To create the tables, the application use the mapping of types of
>>> hibernate.
>>>
>>> When I execute it, hibernate tries to create a double that does not
>>> exist
>>> on Informix.
>>>
>>> I think this is a bug on InformixDialect class ( see
>>> http://www.koders.com/java/fid5D5E8B3F3A06C97ADEF4EB967448690F51675C5A.aspx
>>> ).
>>>
>>> Does anyone knows a way to fix this ?
>>>
>>> Changing and recompiling InformixDialect class works but I cannot do it
>>> because my customer want the Hibernate jar that comes with the
>>> application
>>> distribution :-( .
>>>
>>> Thanks
>>> S'rgio Ferreira
>> _______________________________________________
>> Informix-list mailing list
>> Informix-list@iiug.org
>> http://www.iiug.org/mailman/listinfo/informix-list
>>
>>
>
>
Informix already has a "DOUBLE PRECISION" as a synonym for FLOAT, so it's probably causing a problem in the parser.
You could use:
CREATE DISTINCT TYPE "username".double AS FLOAT;
CREATE TABLE test
(
col1 "username".double
);
This will avoid the syntax errors, but it's probably useless in your case...
Regards.
P.S.: I was not able to call you... We'll have to talk tomorrow.
Regards.
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...