Gorm has a FirstOrCreate
method and a FirstOrInit
but how to check afterwards if the record was actually created? I like to create a record if it does not exists and if it exists I want to update some fields.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…