dozd / mongo-mapper

Easy POJO codec for MongoDB in Java
Apache License 2.0
27 stars 9 forks source link

Any plans to use Spring annotations instead of indigenous ones? #9

Open zendu opened 7 years ago

zendu commented 7 years ago

I use Spring Data MongoDB in my project. Spring falls short in supporting latest features of MongoDB, so I need resort to using native MongoDB Java driver. It would be really good if there was any way to reuse existing Spring annotations instead of custom annotations specific to this library. I am sure there are other people around with similar situation. Any thoughts on it?

dozd commented 7 years ago

Sure, it won't be a problem. I'll have a look at it and probably introduce new mongo mapper spring integration module.

dozd commented 7 years ago

Can you please provide annotations which you would like to see working out of the box (with whole package names)? Thanks.

zendu commented 7 years ago

Following ones are most frequently used import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Field;

dozd commented 7 years ago

Could you test latest snapshot version from master if it's working as expected?

import org.springframework.data.mongodb.core.mapping.Field; is not supported as there is no counterpart in the current state of the library.