Hello!
I'm using MongoDB with Hibernate OGM 4.1.1.
I'm trying to map an entity with a property containing binary data (a file).
I'm having problems with this property "image". I don't know, this is not mapped.
What am I doing wrong?
How should save this kind of data?
Code:
@Entity
@Table(name="photos")
public class Photo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Type(type = "objectid")
private String id;
private String user;
private long creation_time;
private String title;
@ElementCollection
private List<String> tags;
private byte[] image;
Thanks for all.