Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestPolymorphic (0.09 sec)

  1. schema/relationship_test.go

    						{ForeignKey: "OwnerType", ForeignSchema: "Toy", PrimaryValue: "users"},
    						{ForeignKey: "OwnerType", ForeignSchema: "Toy", PrimaryValue: "users"},
    					},
    				},
    			},
    		},
    	})
    }
    
    func TestPolymorphic(t *testing.T) {
    	t.Run("has one", func(t *testing.T) {
    		type Toy struct {
    			ID        int
    			Name      string
    			OwnerID   int
    			OwnerType string
    		}
    
    		type Cat struct {
    			ID   int
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Aug 18 11:44:52 UTC 2025
    - 26.5K bytes
    - Viewed (0)
Back to top