문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top