1
votes

I was following the below guidelines to implement MongoDB ORM in my Quarkus server app.

QUARKUS - SIMPLIFIED MONGODB WITH PANACHE

https://quarkus.io/guides/mongodb-panache

How can I achieve document reference with this?

For example: If I have 2 entities like Employee, Organisation then how can I refer Organisation in my Employee entity?

1
Hi, I'm a little confused with this question as you talked about both Hibernate and MongoDB with Panache. For MongoDB with Panache you should follow this guide: quarkus.io/guides/mongodb-panacheloicmathieu
@loicmathieu Yes same example Im using but I just wanted to know how I can achieve docs.mongodb.com/manual/reference/database-references/#dbrefs using this example.Vaisakh Prakash

1 Answers

0
votes

Quarkus MongoDB with Panache didn't offers specific support for dbref.

You may be able to use a field of type com.mongodb.DBRef but we will not automatically load the document referenced by it so you need to do it by yourself.