Can I create a one to one relationship that would actually fetch the last item?
The relationship is actually a one to many but only want to retrieve the last one.
goal: one(goals, {
fields: [habits.goalId],
references: [goals.id],
}),
Doing this unfortunately retrieves the first one not the last. I cannot seem to set a orderBy to sort this
0 Replies