-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi there. I have a model which includes relationships. I include relationship data with the .with() function.
Even though fuse says it supports search of nested fields using the dot notation (https://fusejs.io/examples.html#nested-search), the neste fields of my model do not seem to be picked up.
const inquiries = computed(() => {
const query = Inquiry.query()
.has('shipment')
.with('shipment.origin|destination')
.with('user')
.orderBy('created_at', 'desc')
if (searchterm.value?.length > 2) {
query.search(searchterm.value, {
keys: ['status', 'shipment.hubspot_deal_id', 'user.first_name', 'user.last_name']
})
}
return query.get()
})If I search the status field. It appears to be working correctly. But if I try to search a user by first name or last name, the search result turns up empty.
So I guess my questions are:
- Does this plugin support the situation above, in which one wants to search nested fields, that consist of related models included using
with()? - When is the search executed? Is this before the
.with()functions have successfully executed, or after?
kieran-wi5, AustinW, petervmeijgaard, erkstruwe, gaetansenn and 1 more
Metadata
Metadata
Assignees
Labels
No labels