- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for body (0.11 sec)
-
schema/relationship_test.go
Locale string `gorm:"primary_key"` Value string } type Blog struct { ID uint `gorm:"primary_key"` Locale string `gorm:"primary_key"` Subject string Body string Tags []Tag `gorm:"many2many:blog_tags;"` SharedTags []Tag `gorm:"many2many:shared_blog_tags;ForeignKey:id;References:id"`
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 25.5K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
if err := DB.AutoMigrate(&Blog{}, &Tag{}); err != nil { t.Fatalf("Failed to auto migrate, got error: %v", err) } blog := Blog{ Locale: "ZH", Subject: "subject", Body: "body", Tags: []Tag{ {Locale: "ZH", Value: "tag1"}, {Locale: "ZH", Value: "tag2"}, }, } DB.Save(&blog) if !compareTags(blog.Tags, []string{"tag1", "tag2"}) { t.Fatalf("Blog should has two tags")
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 12.8K bytes - Viewed (0)