tessl install tessl/golang-gorm-io--gorm@1.31.0Full-featured ORM library for Golang with associations, hooks, transactions, migrations, and developer-friendly chainable API
Agent Success
Agent success rate when using this tile
81%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.13x
Baseline
Agent success rate without this tile
72%
{
"context": "This evaluation assesses the engineer's ability to implement and use GORM's HasOne relationship feature to establish a one-to-one association between database models. The criteria focus on proper model definition, relationship configuration, and the use of GORM's association loading capabilities.",
"type": "weighted_checklist",
"checklist": [
{
"name": "HasOne Relationship Definition",
"description": "The User model correctly defines a HasOne relationship to the Profile model using a field with the Profile type and appropriate struct tag or naming convention that GORM recognizes (e.g., Profile field of type Profile).",
"max_score": 25
},
{
"name": "Foreign Key Setup",
"description": "The Profile model includes a foreign key field (e.g., UserID) that references the User's primary key, establishing the relationship from the profile side as required for HasOne associations.",
"max_score": 20
},
{
"name": "AutoMigrate Usage",
"description": "Uses GORM's AutoMigrate() method to automatically create database tables with proper schema including foreign key constraints for both User and Profile models.",
"max_score": 15
},
{
"name": "Preload for Association",
"description": "Uses GORM's Preload() method to eagerly load the associated Profile when querying for a User, avoiding N+1 query problems and loading the relationship in an efficient manner.",
"max_score": 25
},
{
"name": "Association Creation",
"description": "Successfully creates both the parent (User) and child (Profile) records with the foreign key properly set, ensuring the Profile is associated with the User upon creation.",
"max_score": 10
},
{
"name": "Association Updates",
"description": "Demonstrates ability to update the associated Profile record using GORM's Update() or Save() methods, showing understanding of how to modify related records in a HasOne relationship.",
"max_score": 5
}
]
}