Hello,
when pre-populating the @id field before doing a MongoRepository#insert, the auditing functionality will only set the @LastModifiedBy field and ignore the @CreatedBy field.
I expect the MongoRepository#insert method to force a isNew=true flag/strategy throughout the whole persist attempt so that the setting EnableMongoAuditing#modifyOnCreate() default true can kick in.
My current fix is to add a custom EntityCallback ensuring the setting of CreatedBy. This EntityCallback is getting executed after org.springframework.data.mongodb.core.mapping.eventAuditingEntityCallback