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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -