- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for polymorphism (0.07 sec)
-
README.md
[](https://pkg.go.dev/gorm.io/gorm?tab=doc) ## Overview * Full-Featured ORM * Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism, Single-table inheritance) * Hooks (Before/After Create/Save/Update/Delete/Find) * Eager loading with `Preload`, `Joins` * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Nov 07 02:20:06 UTC 2023 - 1.8K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/TransportExceptionTest.java
assertEquals(nestedCauseException.getCause(), nestedCauseException.getRootCause()); } @Test @DisplayName("Test exception inheritance and polymorphism") public void testInheritance() { // Create exception TransportException exception = new TransportException("Test exception"); // Test inheritance chain
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.4K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/exception/SearchQueryExceptionTest.java
fail("Should have caught SearchQueryException"); } } public void test_catchAsFessSystemException() { // Test catching as parent exception type String message = "Polymorphism test"; try { throw new SearchQueryException(message); } catch (FessSystemException e) { assertEquals(message, e.getMessage());
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 9.7K bytes - Viewed (0) -
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) -
tests/named_polymorphic_test.go
if hamsterToy.Name != hamster.PreferredToy.Name { t.Errorf("Should find has one polymorphic association") } hamsterToy = Toy{} DB.Model(&hamster).Association("OtherToy").Find(&hamsterToy) if hamsterToy.Name != hamster.OtherToy.Name { t.Errorf("Should find has one polymorphic association") } // Append DB.Model(&hamster).Association("PreferredToy").Append(&Toy{ Name: "bike 2", })
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jul 08 09:59:40 UTC 2020 - 4.2K bytes - Viewed (0) -
tests/update_has_one_test.go
} else { user.Account.UpdatedAt = user4.Account.UpdatedAt CheckUser(t, user4, user) } t.Run("Polymorphic", func(t *testing.T) { pet := Pet{Name: "create"} if err := DB.Create(&pet).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } pet.Toy = Toy{Name: "Update-HasOneAssociation-Polymorphic"} if err := DB.Save(&pet).Error; err != nil { t.Fatalf("errors happened when create: %v", err) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Jul 14 06:55:54 UTC 2022 - 3.6K bytes - Viewed (0) -
utils/tests/models.go
) // User has one `Account` (has one), many `Pets` (has many) and `Toys` (has many - polymorphic) // He works in a Company (belongs to), he has a Manager (belongs to - single-table), and also managed a Team (has many - single-table) // He speaks many languages (many to many) and has many friends (many to many - single-table) // His pet also has one Toy (has one - polymorphic) // NamedPet is a reference to a named `Pet` (has one) type User struct {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Dec 15 08:36:08 UTC 2023 - 2.1K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java
* * @author David Richter */ @NullUnmarked public class IteratorBenchmark { @Param({"0", "1", "16", "256", "4096", "65536"}) int size; // use concrete classes to remove any possible polymorphic overhead? Object[] array; ArrayList<Object> arrayList; LinkedList<Object> linkedList; @BeforeExperiment void setUp() { array = new Object[size];
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 3.5K bytes - Viewed (0)