With [GridFS|http://docs.mongodb.org/manual/core/gridfs/] MongoDB provides a way for storing arbitrary binary files. We might use it to store "overflows" of large entities , e . g. it'd likely be a good fit
We opted for byte arrays using a specific type to represents fields that need to be stored uinsg GridFS. It looks like :
{code} @ Lob @BinaryStorage GridFSBucket ( GRID_FS "photos" ) // Advices the dialect to store the data separately and only a pointer in the entity document private byte[] picture GridFS gridfs ; {code} |
|