Morphia POJO mapping - used when accessing mongodb driver directly? #2137
-
Based on my testing, it looks like the Morphia pojo mapping (via Entity, Property annotations etc.) is used even when bypassing the morphia classes and using the native mongodb driver. For example:
The values updated will used the mapped properties of the pojo object as defined by Morhpia.
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Morphia doesn't directly affect the coded registry being used by the driver. There might be a side effect hidden somewhere in the driver code but as those types are all (largely) immutable I'd be surprised. If you're seeing such behavior I wouldn't depend on it as that's not an intentional (or actual, afaict) feature and as such might change in the future. |
Beta Was this translation helpful? Give feedback.
Morphia doesn't directly affect the coded registry being used by the driver. There might be a side effect hidden somewhere in the driver code but as those types are all (largely) immutable I'd be surprised. If you're seeing such behavior I wouldn't depend on it as that's not an intentional (or actual, afaict) feature and as such might change in the future.