From: Lew <noone@lewscanon.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: ResultSet.getClob() causing problems when used with JPA's @Lob
Date: Tue, 08 Feb 2011 22:23:29 -0500
Message-ID: <iit1ap$hqk$1@news.albasani.net> (raw)
In-Reply-To: <23828143.70.1297164859086.JavaMail.on@prod2>
References: <4D511C79.4010507@opencloud.com>
<23828143.70.1297164859086.JavaMail.on@prod2>
Andreas Joseph Krogh wrote:
> I get around this problem in Hibernate by using this combination:
>
> @Column(name="my_name")
> @Lob
> @Type(type="org.hibernate.type.StringClobType")
>
> ...but the StringClobType is deprecated.
>
It really makes it so much easier to have a TEXT column mapped to a 'String'.
@Entity public class Foo
{
@Id
private String ident;
private String somethingBackedByTEXT;
...
}
FWIW, in a database like Oracle that does have CLOBs it's still a lot easier
with Hibernate to map CLOBs to 'String' than to 'Clob', as I learned from
experience. Even the Hibernate documentation recommends against mapping to
'Clob'.
--
Lew
Ceci n'est pas une fenĂȘtre.
.___________.
|###] | [###|
|##/ | *\##|
|#/ * | \#|
|#----|----#|
|| | * ||
|o * | o|
|_____|_____|
|===========|
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: noone@lewscanon.com
Subject: Re: ResultSet.getClob() causing problems when used with JPA's @Lob
In-Reply-To: <iit1ap$hqk$1@news.albasani.net>
References: <4D511C79.4010507@opencloud.com> <23828143.70.1297164859086.JavaMail.on@prod2> <iit1ap$hqk$1@news.albasani.net>
* 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