I am learning Spring with mongo db and i'm feeling difficulty in learning entity relationship model. Can anyone teach me how can i implement the following design.
Person collection A person class
id
name
List of sports object
Sport collection A Sport class
id (Auto generated)
sport name
while i am saving the person class which contains sport class, Sport entity should be saved in Sport collection if it is not already present and Person entityShould be stored in Person collection with Sport objects Reference.
While i am retrieving Person class, associated sport class should be fetched from corresponding collection. I have tried with @DBRef and it is not worked for me. It will be very helpful if anyone teach me this scenario or giving the reference to learning this concepts.
I think your question would set better in our Mongo forum, and it might be duplicated into other fora too. But implementing those features in a class shouldn't be difficult. How far have you got?
Life just hasn't been the same since the volcano erupted and now the air is full of tiny ads.
a bit of art, as a gift, the permaculture playing cards