1

I'm trying to experiment with GridFS in Hibernate-ogm. This is simply my class

import org.hibernate.ogm.datastore.mongodb.type.GridFS;

@Embeddable
public class MyEntity implements Serializable{

    private String name;

    public MyEntity () {
    }

    GridFS list;
}

I get the error in title at runtime when I try to make this entity persistent. Eclipse IDE on list field says "Attribute list has invalid mapping type in this context".

alfredopacino
  • 2,979
  • 9
  • 42
  • 68

1 Answers1

0

Currently, the GridFS type doesn't work with associations. You can only use it as an attribute of an entity.

There is an issue for this: https://hibernate.atlassian.net/browse/OGM-1553 You can also find some more information in the forum: https://discourse.hibernate.org/t/org-hibernate-hibernateexception-ogm000080-could-not-load-an-entity-batch/2148

Davide D'Alto
  • 7,421
  • 2
  • 16
  • 30