Re: [HACKERS] JPA + enum == Exception
| От | Andreas Joseph Krogh |
|---|---|
| Тема | Re: [HACKERS] JPA + enum == Exception |
| Дата | |
| Msg-id | OrigoEmail.92d.df33c04ef5eb80b3.13fae424147@prod2 обсуждение |
| Ответ на | Re: [HACKERS] JPA + enum == Exception (Tom Dunstan <pgsql@tomd.cc>) |
| Список | pgsql-jdbc |
På fredag 05. juli 2013 kl. 11:47:22, skrev Tom Dunstan <pgsql@tomd.cc>:
Hi AndreasOn 5 July 2013 18:51, Andreas Joseph Krogh <andreak@officenet.no> wrote:I've been using Hibernate for years with mapping Enums to varchar-columns which works fine. Remember to map them withI'm not trying to map them to varchar columns - I'm trying to map them to columns with postgresql enum types as created by CREATE TYPE, see e.g. http://www.postgresql.org/docs/9.2/static/datatype-enum.html. The built-in enum types are designed for that purpose, and perform better and more safely than using varchars.Mapping java enums to a typesafe and efficient version in the db was the main reason I did the work to add native enums to postgresql in the first place - I haven't had a chance to use it recently, and I'm a bit disappointed that it doesn't work out of the box. So I want to fix up whatever parts of the stack are in the way of making that work.
I'm sorry, I missread your post.
--
Andreas Joseph Krogh <andreak@officenet.no> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
Andreas Joseph Krogh <andreak@officenet.no> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
В списке pgsql-jdbc по дате отправления: