user3318618
user3318618

Reputation: 73

JDO Datanucleus: Annotator @Column(jdbcType="") not working

I noticed that this type of annotation does not work. In my example I had set:

      @Column(jdbcType="VARCHAR(5)")
      private String id;

but in the db saves me how: VARCHAR(255).

How can I fix?

Upvotes: 0

Views: 169

Answers (1)

Gilberto Torrezan
Gilberto Torrezan

Reputation: 5267

You should use:

@Column(jdbcType="VARCHAR", length=5)
private String id;

From the documentation here: http://www.datanucleus.org/products/accessplatform/jdo/annotations.html#Column

Upvotes: 4

Related Questions