Reputation: 51
I'm trying to use searchable to find values by a null field. Or for that matter even index an id from a sub domain.
class Classified
{
searchable = {
only = ['id','title']
id name: 'classified_id'
title name: 'classified_title'
}
String title
Dealer dealer
}
class Dealer
{
String name
}
I want to just index the dealer_id that would exist in classifieds table to reference dealer. Then I want to be able to search classifieds by null dealer_id and numeric dealer_id. I tried making dealer searchable, but the problem with that is that if there is no dealer and classified.dealer_id is null it never even gets there.
Upvotes: 0
Views: 394
Reputation: 208
Example,
static searchable = {
dealer componenet true
}
And Within the Dealer
static searchable = {
property nullValue "-1"
}
Upvotes: 1