Closed
Description
Hello,
according to documentation this works
@Document
class Book {
@Id
ObjectId id;
String title;
ObjectId publisherId;
}
@Document
class Publisher {
@Id
ObjectId id;
String acronym;
String name;
@ReadOnlyProperty
@DocumentReference(lookup="{'publisherId':?#{#self._id} }")
List<Book> books;
}
I tried to change the data type from ObjectId
to String
and it does not work.
@Document
class Book {
@Id
String id;
String title;
String publisherId;
}
@Document
class Publisher {
@Id
String id;
String acronym;
String name;
@ReadOnlyProperty
@DocumentReference(lookup="{'publisherId':?#{#self._id} }")
List<Book> books;
}
What am I missing ?