Slackbot
10/03/2023, 8:01 PMSol Shenker
10/03/2023, 8:13 PMinterface ITagService {
Tag findOrCreateByLabel(String label)
}
@Service(Tag)
abstract class TagService ITagService {
}seanoc5
10/03/2023, 8:24 PMseanoc5
10/03/2023, 8:27 PMseanoc5
10/03/2023, 8:31 PMfind part, but return null for the create/save parts.
It makes me think perhaps it is a bug in my version (5.2.4) of grails?
I will see about testing a more recent version in the next couple of days. I just really wrestled with getting 5.3+ working, and 6 was "right out" for me.
Perhaps I've learned/remembered enough now to try again : -)seanoc5
10/03/2023, 8:35 PMseanoc5
10/03/2023, 8:46 PM@Override
Tag findOrSaveByLabel(String label){
Tag t = Tag.findOrSaveByLabel(label)
if(t==null){
log.warn "No tag:$t (labeL: $label)"
}
return t
}
but it feels like I am missing the 'DRY' approach.
c'est la vie...