I see in various searches that some people create their own BinaryBlobType
and use some XML to tell Hibernate to map that custom type to a blob.

On other sites, I see that with annotations, I am supposed to do the
following:

    @Lob
    @Column(name="FILE_CONTENTS")
    public byte[] getFileContents() {
        return fileContents;
    }

    public void setFileContents(byte[] fileContents) {
        this.fileContents = fileContents;
    }

assuming here that we have an attribute called fileContents.

I am going to be storing uploaded file content in the database.  Do I need
to worry about the custom type then?

Reply via email to