- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Polymorphic (0.31 sec)
-
schema/relationship.go
// OwnerType string // } func (schema *Schema) buildPolymorphicRelation(relation *Relationship, field *Field) { polymorphic := field.TagSettings["POLYMORPHIC"] relation.Polymorphic = &Polymorphic{ Value: schema.Table, } var ( typeName = polymorphic + "Type" typeId = polymorphic + "ID" ) if value, ok := field.TagSettings["POLYMORPHICTYPE"]; ok { typeName = strings.TrimSpace(value) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 23.1K bytes - Viewed (1) -
schema/relationship_test.go
Schema: "User", FieldSchema: "Toy", Polymorphic: Polymorphic{ID: "OwnerID", Type: "OwnerType", Value: "users"}, References: []Reference{ {ForeignKey: "OwnerType", ForeignSchema: "Toy", PrimaryValue: "users"}, }, }, }, }, }) }) t.Run("has one with custom polymorphic type and id", func(t *testing.T) { type Toy 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) -
schema/schema_helper_test.go
} if r.Polymorphic != nil { if r.Polymorphic.PolymorphicID.Name != relation.Polymorphic.ID { t.Errorf("schema %v relation's polymorphic id field expects %v, but got %v", s, relation.Polymorphic.ID, r.Polymorphic.PolymorphicID.Name) } if r.Polymorphic.PolymorphicType.Name != relation.Polymorphic.Type {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 7.5K bytes - Viewed (0) -
schema/schema_test.go
References: []Reference{{"ID", "User", "UserID", "Pet", "", true}}, }, { Name: "Toys", Type: schema.HasMany, Schema: "User", FieldSchema: "Toy", Polymorphic: Polymorphic{ID: "OwnerID", Type: "OwnerType", Value: "users"}, References: []Reference{{"ID", "User", "OwnerID", "Toy", "", true}, {"", "", "OwnerType", "Toy", "users", false}}, }, {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 28 02:57:17 UTC 2025 - 13.3K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/entity/SearchLogEventTest.java
SearchLogEvent event1 = new TestSearchLogEvent("id1", 1L, "type1"); SearchLogEvent event2 = new NullSearchLogEvent(); SearchLogEvent event3 = new EmptySearchLogEvent(); // Test polymorphic behavior SearchLogEvent[] events = { event1, event2, event3 }; for (SearchLogEvent event : events) { // All methods should be callable without exceptions
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 11.6K bytes - Viewed (0)