Description
This is an amazing new feature and I definitely am looking forward to using it when 2.6 is released.
However, I have been playing around with it in some sandbox projects and (perhaps there is something I am missing, the documentation doesn't seem to address it?) but there appears to be one specific functional gap in the usage of it.
Assume I have:
class Book {
@Id
String id;
private String publisherId;
}
class Publisher {
@Id
String id;
@ReadOnlyProperty
@DocumentReference(lookup="{'publisherId': <this.id> ???}")
List<Book> books;
}
Is it at all possible for the list of books to do a db.books.find({'publisherId': Publisher::id}) without storing a List bookIds on the Publisher class? Perhaps I am missing something from the documentation and this is already supported?
If not, then (I realize we're starting to get into foreign key relationships with Mongo which isn't the greatest thing), it does seem like a use case that would be beneficial to support if possible?
Thanks!