Error Saving and getting blob from database SQL oracle

前端 未结 2 500
南笙
南笙 2021-01-06 15:13

I\'m trying to save a CLOB into the database and recovering it, but I\'m getting an SQLException:

Caused by: java.sql.SQLException: Lob read/write functions          


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-06 16:19

    I encountered a similar problem in one of the projects, setting

    updatable = false

    fixed the issue for me.

    Example:

    @Lob
    @Column(name = "CONTENT", updatable = false)
    Blob content;
    

    Hibernate somehow tries to re-save the content, even when it was not changed.

提交回复
热议问题