CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/golang-gorm-io--gorm

tessl install tessl/golang-gorm-io--gorm@1.31.0

Full-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%

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how well the engineer uses GORM's polymorphic association features to implement a comment system that works across multiple media types (posts, videos, images). The focus is on proper use of GORM's polymorphic relationship configuration and association handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Polymorphic tag usage",
      "description": "Correctly uses the `polymorphic` struct tag on the Comments field in Post, Video, and Image structs to configure the polymorphic association (e.g., `gorm:\"polymorphic:Commentable;\"`)",
      "max_score": 30
    },
    {
      "name": "Type and ID fields",
      "description": "Correctly defines CommentableID and CommentableType fields in the Comment struct to store the polymorphic owner information",
      "max_score": 20
    },
    {
      "name": "AutoMigrate usage",
      "description": "Uses GORM's AutoMigrate method to create the database schema for all models (Post, Video, Image, Comment)",
      "max_score": 10
    },
    {
      "name": "Association method",
      "description": "Uses GORM's Association().Append() or similar association methods to add comments to media entities rather than manually setting CommentableID and CommentableType",
      "max_score": 25
    },
    {
      "name": "Preload or Joins",
      "description": "Uses GORM's Preload() or Joins() method to eagerly load comments when querying for posts, videos, or images with their associated comments",
      "max_score": 15
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
golangpkg:golang/gorm.io/gorm@v1.31.1
tile.json