[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-bugs
Subject:    Re: [BUGS] BUG #8389: JDBC Driver assumes first column to be an integer
From:       Kevin Grittner <kgrittn () ymail ! com>
Date:       2013-08-20 19:02:23
Message-ID: 1377025343.62060.YahooMailNeo () web162901 ! mail ! bf1 ! yahoo ! com
[Download RAW message or body]

"ivan.pli@solidit.cl" <ivan.pli@solidit.cl> wrote:

> When having a table with the next columns:
> content varchar(10)
> idcontent int primary key

> Persisting a row using the JDBC driver (I used JBoss and
> hibernate to persist a bean)

> The JDBC driver throws an exception while trying to parse the
> first column content (a string) as an integer.

I think the behavior you are seeing is due to JBoss or Hibernate. 
I've used many tables with no integer columns through PostgreSQL
JDBC.  Hibernate, by default, seems to want every table to have a
primary key of a single integer column, it but can be coerced to
work with a properly normalized relational database with a little
effort.  In my experience it's worth the effort.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic