From: Susannah Relf <cyclingrelf@googlemail.com>
To: pgsql-jdbc@postgresql.org
Subject: Java persistence with enum types
Date: Sat, 23 May 2009 15:02:12 +0100
Message-ID: <548aeab30905230702x1e7d0620nb3686c49bf889a68@mail.gmail.com> (raw)
Hi, I have an enum type in my postgres 8.3 database:
CREATE TYPE typeOfNames AS ENUM ('Latin', 'Common', 'Local');
I am trying to access the database through the Java Persistence API using
Netbeans:
@Lob
@Column(name = "typeofname")
private String typeofname;
This works for reading from the database, but writing to it, I get the error
message:
Caused by: org.postgresql.util.PSQLException: ERROR: column "typeofname" is
of type typeofnames but expression is of type character varying
Anyone got any suggestions?
Thanks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: cyclingrelf@googlemail.com
Subject: Re: Java persistence with enum types
In-Reply-To: <548aeab30905230702x1e7d0620nb3686c49bf889a68@mail.gmail.com>
References: <548aeab30905230702x1e7d0620nb3686c49bf889a68@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox