Open
Description
Explore if it makes sense to have a different extraction pattern for storing the relation than for the retrieval. Doing so would allow users to build dedicated views on the data for reading operations that require less data and must not resolve the reference.
class Payment {
String id;
@DocumentReference(fields = { "id", "name", "birthdate" }, lookup="{ '_id' : ?#{#target.id} }")
Customer sender;
PaymentReceiver receiver;
// ...
}