Generic MongoRepository Interface for Multiple Documents in MongoDB -


here example on accessing person document mongodb.

public interface personrepository extends mongorepository<person, string>  @query("{ 'firstname' : ?0 }")  list<person> findbythepersonsfirstname(string firstname); } 

if have 5 documents ex: person, family, relation. etc. need create 5 repositories , extend mongorepository or there way achieve in 1 mongorepository.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -