Skip to content
Advertisement

Tag: postgresql

COPY FROM and C3PO connection pool in Postgres

I have the follow code in my JAVA program that allows me to copy data from a file into my Postgres database: This code works fine, but I would like to use a connection pool to manage my connections, as I have this code running for numerous files. So I used C3P0. However, when i get a connection from the

Hibernate startup very slow

For some reason, the startup of my hibernate application is unbarrably slow. (up to 2 min) I have been thinking that the c3p0 configuration is plain wrong (related question) but studying the logs shows, that there is no activity just after the connection to the server is established. Also, using the built-in polling capabilities of Hibernate shows the same result.

Mapping array with Hibernate

Can you please help me to map this class using Hibernate? I’m using PostgreSQL and the column type in the table is integer[] How my array should be mapped? Answer I have never mapped arrays to hibernate. I always use collections. So, I have slightly changed you class:

How to map a PostgreSQL array with Hibernate

Has anyone successfully mapped a numeric array in PostgreSQL to a numeric array in Java via Hibernate? SQL: Mapping: Class: I get an exception when querying the table. Answer Hibernate does not support database arrays (e.g. ones mapped to java.sql.Array) out of the box. array and primitive-array types provided by Hibernate are for mapping Java arrays into backing table –

Advertisement