Variable length Blob in hibernate?
- by Seth
I have a byte[] member in one of my persistable classes. Normally, I'd just annotate it with @Lob and @Column(name="foo", size=). In this particular case, however, the length of the byte[] can vary a lot (from ~10KB all the way up to ~100MB).
If I annotate the column with a size of 128MB, I feel like I'll be wasting a lot of space for the small…