-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I'm trying to get a cache working where the relationship is "many-to-one unique", but I think this package doesn't handle it. Here's an example:
I have a collection of Authors, and a collection of Comments. The authors store an array of commentIds, and I want each comment to denormalize the author, without it being an array.
Authors // { commentIds: ['commentId1', 'commentId2'] }
// What I want
Comments: // { authorCache: { _id: 'authorId', name: 'John' } }
// What I get
Comments: // { authorCache: [{ _id: 'authorId', name: 'John' }] }Usually many-to-one means there can be many authors linking to the same comment, but that's not the case here, so the cache is not correct.
doronrk
Metadata
Metadata
Assignees
Labels
No labels