|
That's a left-over of OGM-810. Write concern and read preference are the only two remaining properties which are not configured through the "driver" sub namespace but withing "hibernate.ogm.mongodb" directly. The reason being, that the original driver settings expect WriteConcern instances, whereas OGM offers an enum to represent the common default values (JOURNALED etc.).
My preference would be to move the two under the "driver" namespace (removing the existing properties) and enhance their handling a bit: Accept FQNs of implementations AND accept short names such as JOURNALED.
Related to this the API + annotation configuration does not allow for custom WC/RP instances atm., only the pre-defined (enum) values. It'd make sense to allow that as well.
|