From: | Lew <noone(at)lewscanon(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: ResultSet.getClob() causing problems when used with JPA's @Lob |
Date: | 2011-02-09 03:23:29 |
Message-ID: | iit1ap$hqk$1@news.albasani.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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|
|_____|_____|
|===========|
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Joseph Krogh | 2011-02-09 08:04:05 | Re: ResultSet.getClob() causing problems when used with JPA's @Lob |
Previous Message | Kris Jurka | 2011-02-09 00:20:32 | Re: ResultSet.getClob() causing problems when used with JPA's @Lob |