How to override getter and setter for field being a relation one-to-many in grails domain class? I know how to override getters and setters for fields being an single Object
Need the reference Set<Title> titles.
Set<Title> titles
class Entity { Set<Title> titles static hasMany = [ titles: Title ] public Set<Title> getTitles() { if(titles == null) return null; return titles.findAll { r -> r.isActive == true } } public void setTitles(Set<Title> s) { titles = s } }