1
2
3
4
5
6
7
8
9
10
11
12
13
    def listWordsStartWith(startPart, loc){

        def regexp = startPart+'%'
        def query = Word.where {
            translations{
                locale == loc &&
                        word =~ regexp
            }
        }
        def words = query.list(/*params*/)
        words

    }