document not saving in spring jpa document manager application

前端 未结 4 1996
情歌与酒
情歌与酒 2020-12-10 13:38

I am developing a document management application in spring using jpa and MySQL. The application is currently accepting a document an

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 14:33

    I'm not a Hibernate-with-annotations expert (I've been using it since 2004, but with XML config). Anyway, I'm thinking that you're mixing annotations incorrectly. You've indicated that you don't want the file field persisted with @Transient, but you've also said it's a @Lob, which implies you do want it persisted. Looks like @Lob is winning, and Hibernate is trying to resolve the field to a column by using the field name.

    Take off the @Lob and I think you'll be set.

提交回复
热议问题