Hibernate on Oracle: mapping String property to CLOB column

前端 未结 2 1404
野的像风
野的像风 2020-12-06 11:20

WARNING: see my own answer below. The problem is caused by old Oracle drivers that were present on the classpath in addition to 10.2.0.4. Problem solved. Le

相关标签:
2条回答
  • 2020-12-06 11:36

    Have you tried dropping the @Lob annotation, and just annotating it with @Column? In my experience, you don't need to tell hibernate the column type for a CLOB, it will determine it on its own.

    Can you include a snippet of the client code which is performing the batching operation?

    0 讨论(0)
  • 2020-12-06 11:59

    Moron alert: it turns out that I had a stale JAR with 9-something Oracle JDBC classes on my classpath. Having cleaned that up, everything simply worked magically with just the following annotations:

    @Lob
    @Column(name = "PIGGY_DESCRIPTION")
    public String getDescription() { return description; }
    

    Blame the fat fingers.

    0 讨论(0)
提交回复
热议问题