How is a blob column annotated in Hibernate?

前端 未结 2 1955
梦如初夏
梦如初夏 2020-12-09 07:59

How is a blob column annotated in Hibernate? So far I have a class that has:

@Column( name = \"FILEIMAGE\" )
private byte[ ] fileimage ;
//
public byte[ ] ge         


        
2条回答
  •  盖世英雄少女心
    2020-12-09 08:39

    @Lob should do the trick for blob and clob (use String as type)

    @Column( name = "FILEIMAGE" )
    @Lob(type = LobType.BLOB)
    private byte[] fileimage;
    

提交回复
热议问题