Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for shared_blog_tags (0.23 sec)

  1. tests/multi_primary_keys_test.go

    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"`
    	LocaleTags []Tag `gorm:"many2many:locale_blog_tags;ForeignKey:id,locale;References:id"`
    }
    
    type Tag struct {
    	ID     uint   `gorm:"primary_key"`
    	Locale string `gorm:"primary_key"`
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 12.8K bytes
    - Viewed (0)
  2. schema/relationship_test.go

    		},
    		Relation{
    			Name: "SharedTags", Type: schema.Many2Many, Schema: "Blog", FieldSchema: "Tag",
    			JoinTable: JoinTable{Name: "shared_blog_tags", Table: "shared_blog_tags"},
    			References: []Reference{
    				{"ID", "Blog", "BlogID", "shared_blog_tags", "", true},
    				{"ID", "Tag", "TagID", "shared_blog_tags", "", false},
    			},
    		},
    		Relation{
    			Name: "LocaleTags", Type: schema.Many2Many, Schema: "Blog", FieldSchema: "Tag",
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
Back to top