Closed SwathiMystery closed 10 years ago
Sorry, I know this is an old question but I still answer :
This is indeed a well known and well commented issue in spring-data and resthub does not provide any specific workaround.
You can find below some really good resources about this subjet by Oliver Gierke from Spring team.
You can prevent the _class attribute to be generated but with caution : the _class information actually serves to properly manage polymorphism.
You'd better use @TypeAlias as suggested by Oliver again, to allow future refactorings.
http://stackoverflow.com/questions/6810488/spring-data-mongodb-mappingmongoconverter-remove-class/
I know this is a known issue with Spring that _class:"com.package.model" gets generated in the mongodb document. What is the workaround while using resthub-mongodb spring profile?