Sorry if the title is not that specific, but I don't know how else to state my problem. I'm using the searchable plugin and everything was fine until I needed to search for information that is on a domain associated by a hasMany - BelongsTo.
Example:
I have two classes:
class Author {
String name
static hasMany = [books: Book]
static searchable = true
}
And
class Book {
String name
static belongTo = [author: Author]
static searchable = true
}
I need to be able to search a book given either it's name or author.
But when calling Book.search(query, [properties:['name', author]])
just the name of the Book is searched, but never the Author.
I have tried with author component: true
(on Book class), root:false
(on Author class) with no luck.
This issue already costed me hours, and I was sure it had to be something simple to implement.