Case-insensitive find_or_create_by_whatever

后端 未结 4 1099
天命终不由人
天命终不由人 2021-01-12 15:58

I want to be able to do Artist.case_insensitive_find_or_create_by_name(artist_name)[1] (and have it work on both sqlite and postgreSQL)

What\'s the best

4条回答
  •  [愿得一人]
    2021-01-12 16:17

    Talked about this one here. No one was able to come up with a solution better than yours :)

提交回复
热议问题