Usage Notes

If using JDO/DataNucleus, Blob properties can be mapped using:

@javax.jdo.annotations.Persistent(defaultFetchGroup="false")
    @javax.jdo.annotations.Persistent(defaultFetchGroup="false", columns = {
            @javax.jdo.annotations.Column(name = "attachment_name"),
            @javax.jdo.annotations.Column(name = "attachment_mimetype"),
            @javax.jdo.annotations.Column(name = "attachment_bytes", jdbcType = "BLOB", sqlType = "BLOB")
    })
@Property(optionality = Optionality.OPTIONAL)
@Getter @Setter
private Blob attachment;

If the property is mandatory, add allowsNull = "false for each of the @Columns.