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

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

javascript - Using jquery append to add option values into a select element not working -