I notices when I use @ElementCollection the entity will be persisted without the list and the list will be set afterwards with an extra update. Due to the fact the list is embedded I would expect it to be saved within the first insert. @Entity @Table(name = "logs") public class LogEntry { ... @ElementCollection(fetch = FetchType.EAGER) private List<String> subsystems; Log Output: save: ogm-eval.logs { "_id" : "eventId" , "logTimestamp" : "2016/01/21 11:56:04:686 +0100" , "systemData" : { "eventType" : "READ" , "systemId" : "SERVICEBUS-NODE1"} , "version" : 0} <- note subsystems omitted! update: ogm-eval.logs { "_id" : "eventId"} { "$set" : { "subsystems" : [ "PAYMENT" , "DEBIT"]}} <- this update comes afterwards So for one insert two queries are generated which is a performance concern! Code snipped is straightforward forward: LogEntry entry = new LogEntry(); entry.setSubsystems(Arrays.asList("PAYMENT", "DEBIT")); em.persist(entry); |