Hi Bhagyesh,
Questions related to the use of MongoDB (i.e. your question) are better sent to mongodb-user group. This group (mongodb-dev) is for discussion for/by/about developers/development/code of MongoDB.
my question is how do I implement one to many in java
I’ll suggest to review One-to-Many relationships: embedded and One-to-Many relationships: references in the manual to get started with your schema. See also Blog: 6 rules of thumb for schema design for more considerations when designing a schema.
To get started using MongoDB with Java please see MongoDB Java driver Quick-Start. You may also find M101: MongoDB for Java Developers a useful free online course for working with the Java driver.
If you have further questions, please post a new discussion on mongodb-user group along with information below:
Regards,
Wan.