[hibernate-dev] [OGM] Mapping of component types in document stores

2016-07-12 Thread Gunnar Morling
Hi, We had an interesting discussion on how to map element collections of component types with a single column to document stores such as MongoDB. E.g. assume we have @Entity public class Person { public String name; @ElementCollection public List statusHistory;

Re: [hibernate-dev] [OGM] Mapping of component types in document stores

2016-07-12 Thread Sanne Grinovero
On 12 July 2016 at 10:55, Gunnar Morling wrote: > Hi, > > We had an interesting discussion on how to map element collections of > component types with a single column to document stores such as MongoDB. > > E.g. assume we have > > @Entity > public class Person { > > public String n

Re: [hibernate-dev] [OGM] Mapping of component types in document stores

2016-07-12 Thread Gunnar Morling
> I'd be concerned about schema evolution: Yes, that's the main argument; as said, I can see that. > I'd see more value in making this the default, and have an "higher > level" configuration property which is like "read like OGM 5.0 used to > store it". I wouldn't like changing such default in a

Re: [hibernate-dev] [OGM] Mapping of component types in document stores

2016-07-12 Thread Sanne Grinovero
On 12 July 2016 at 11:13, Gunnar Morling wrote: >> I'd be concerned about schema evolution: > > Yes, that's the main argument; as said, I can see that. > >> I'd see more value in making this the default, and have an "higher >> level" configuration property which is like "read like OGM 5.0 used to

Re: [hibernate-dev] [OGM] Mapping of component types in document stores

2016-07-12 Thread Guillaume Smet
Hi, For the sake of completeness, here is the mapping obtained with Morphia: { "_id" : ObjectId("5784ca2612d0226cb309666d"), "className" : "TestEntity", "embeddeds" : [ { "singleProperty" : "value1" }, { "singleProperty" : "value2" } ], "embedded" : { "singleProperty" : "value" }, "collectionOfStr