Hibernate OGM causes superfluous update for element collection

Description

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.

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 snippet is straightforward:

Environment

Wildfly 9.0.2

Status

Assignee

Guillaume Smet

Reporter

Markus Dorner

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Sprint

Fix versions

Affects versions

Priority

Major
Configure