Re: ResultSet.getClob() causing problems when used with JPA's @Lob
| От | Lew |
|---|---|
| Тема | Re: ResultSet.getClob() causing problems when used with JPA's @Lob |
| Дата | |
| Msg-id | iit1ap$hqk$1@news.albasani.net обсуждение исходный текст |
| Ответ на | Re: ResultSet.getClob() causing problems when used with JPA's @Lob (Andreas Joseph Krogh <andreak@officenet.no>) |
| Ответы |
Re: ResultSet.getClob() causing problems when used with JPA's
@Lob
|
| Список | 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|
|_____|_____|
|===========|
В списке pgsql-jdbc по дате отправления: