Answers for "gorm in grails"

0

GORM in grails

def b = Book.findByTitle("The Shining")

    b = Book.findByTitleAndAuthor("The Sum of All Fears", "Tom Clancy")
    b = Book.findByReleaseDateBetween(firstDate, new Date())
    b = Book.findByReleaseDateGreaterThanEquals(firstDate)
    b = Book.findByReleaseDateLessThanEquals(firstDate)
    b = Book.findByTitleLike("%Hard work%")
    b = Book.findByTitleIlike("%Hard work%") // ignores case
    b = Book.findByTitleNotEqual("Harry Potter")
    b = Book.findByReleaseDateIsNull()
    b = Book.findByReleaseDateIsNotNull()
    b = Book.findPaperbackByAuthor("Douglas Adams")
    b = Book.findNotPaperbackByAuthor("Douglas Adams")
    b = Book.findByAuthorInList(["Douglas Adams", "Hunter S. Thompson"])
Posted by: Guest on February-11-2021
0

gorm in grails

def results = Book.findAllByTitle("The Shining",
[max: 10, sort: "title", order: "desc", offset: 100])
Posted by: Guest on February-11-2021

Browse Popular Code Answers by Language