Full-featured ORM library for Golang with associations, hooks, transactions, migrations, and developer-friendly chainable API
81
Pending
Does it follow best practices?
Impact
81%
1.12xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "This evaluation assesses the engineer's ability to implement and use GORM's BelongsTo relationship functionality, including proper model setup, foreign key handling, association preloading, and querying through relationships.",
"type": "weighted_checklist",
"checklist": [
{
"name": "BelongsTo Relationship Setup",
"description": "Book model correctly defines the BelongsTo relationship with Author by including both AuthorID (foreign key field) and Author (association field) fields with appropriate types (uint for ID, Author struct for association).",
"max_score": 25
},
{
"name": "Database Connection Initialization",
"description": "Uses gorm.Open() with appropriate SQLite driver to establish database connection, and calls AutoMigrate() on both Author and Book models to create the schema.",
"max_score": 15
},
{
"name": "Association Preloading",
"description": "Uses the Preload() method to eagerly load the Author association when querying for a Book, preventing N+1 query problems and ensuring the Author field is populated.",
"max_score": 25
},
{
"name": "Querying Through Relationships",
"description": "Uses Where() or Joins() clause with foreign key conditions (e.g., AuthorID) to query books belonging to a specific author, demonstrating understanding of how BelongsTo relationships work at the database level.",
"max_score": 20
},
{
"name": "CRUD Operations",
"description": "Uses Create() method to insert Author and Book records with proper foreign key association, and uses Save() or Updates() method to modify existing records.",
"max_score": 15
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10