- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for POLYMORPHICTYPE (0.45 sec)
-
schema/relationship.go
} // hasPolymorphicRelation check if has polymorphic relation // 1. `POLYMORPHIC` tag // 2. `POLYMORPHICTYPE` and `POLYMORPHICID` tag func hasPolymorphicRelation(tagSettings map[string]string) bool { if _, ok := tagSettings["POLYMORPHIC"]; ok { return true } _, hasType := tagSettings["POLYMORPHICTYPE"] _, hasId := tagSettings["POLYMORPHICID"] return hasType && hasId }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 22.4K bytes - Viewed (0) -
schema/schema_helper_test.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 7.5K bytes - Viewed (0) -
utils/tests/models.go
gorm.Model Name string Age uint Birthday *time.Time Account Account Pets []*Pet NamedPet *Pet Toys []Toy `gorm:"polymorphic:Owner"` Tools []Tools `gorm:"polymorphicType:Type;polymorphicId:CustomID"` CompanyID *int Company Company ManagerID *uint Manager *User Team []User `gorm:"foreignkey:ManagerID"` Languages []Language `gorm:"many2many:UserSpeak;"`
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 2.1K bytes - Viewed (0) -
schema/relationship_test.go
type Toy struct { ID int Name string RefId int Type string } type Cat struct { ID int Name string Toy Toy `gorm:"polymorphic:Owner;polymorphicType:Type;polymorphicId:RefId"` } s, err := schema.Parse(&Cat{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("Failed to parse schema, got error %v", err) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 25.5K bytes - Viewed (0)