Suppose you are working with the library.db SQLite database; below, you can see the database diagram:
Your task is to create various records of books and insert them into the books table. However, you want to omit inserting default values in specific fields since you don't know each book's publication date and publisher id.
We have already created a slice of books for you to insert into the books table. Your task is to write the additional code required to omit to insert the DatePublished and PublisherID fields.
While omitting fields during record creation is not a common operation, you can check out the
db.Omit() method in GORM's official documentation to learn how to omit inserting default values into specific fields.