Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

JPA annotating a string property to a MySQL text column

$
0
0
Hello,

I have a MySQL text column: profile text

I'm trying to map a property to it using a JPA annotation.

@Lob
private String profile;

The @Lob annotation gives me the error message:

Wrong column type in db_integration.admin for column profile. Found: text, expected: longtext

I'm using the MySQL Server version: 5.0.45-log Source distribution.

My dependencies are:

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>

with
<properties>
<hibernate.version>3.6.9.Final</hibernate.version>
</properties>

Any clue ?

Viewing all articles
Browse latest Browse all 13329

Trending Articles