Java persistence with enum types

Поиск
Список
Период
Сортировка
От Susannah Relf
Тема Java persistence with enum types
Дата
Msg-id 548aeab30905230702x1e7d0620nb3686c49bf889a68@mail.gmail.com
обсуждение исходный текст
Ответы Re: Java persistence with enum types
Список pgsql-jdbc
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



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Does 8.3/8.4 support lazy fetched + updateable +scrollable ResultSets?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Java persistence with enum types