Gorm不创建条目

I'm new to go and I'm a little confused, why the following:

acccountTypeModelWallet := accounttypes.AccountType{Type: "wallet", Name: "Wallet"}
if db.First(&acccountTypeModelWallet).RecordNotFound() {
    fmt.Println("Account Type `Wallet` not found. Creating..")
    err := db.Create(&acccountTypeModelWallet).Error
    if err != nil {
        return false, err
    }
}

acccountTypeModelBankAccount := accounttypes.AccountType{Type: "bankaccount", Name: "Bank Account"}
if db.First(&acccountTypeModelBankAccount).RecordNotFound() {
    fmt.Println("Account Type `Bank Account` not found. Creating..")
    err := db.Create(&acccountTypeModelBankAccount).Error
    if err != nil {
        fmt.Println(err)
        return false, err
    }
}

acccountTypeModelExchange := accounttypes.AccountType{Type: "exchange", Name: "Exchange Account"}
if db.First(&acccountTypeModelExchange).RecordNotFound() {
    fmt.Println("Account Type `Exchange Account` not found. Creating..")
    err := db.Create(&acccountTypeModelExchange).Error
    if err != nil {
        return false, err
    }
}

Only inserts "Wallet" into the database, but not "Bank Account" and "Exchange"? None of the entries exist at the time of execution so all of them should be created.

What am I missing here?

Ok after logging out the queries I found the mistake. It was querying all of the entries without any conditions. After adding .Where() it worked.

if db.Where(&acccountTypeModelExchange).First(&accounttypes.AccountType{}).RecordNotFound()