Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for OwnerType (0.19 sec)

  1. tests/helper_test.go

    	AssertObjEqual(t, pet.Toy, expect.Toy, "ID", "CreatedAt", "UpdatedAt", "DeletedAt", "Name", "OwnerID", "OwnerType")
    
    	if expect.Toy.Name != "" && expect.Toy.OwnerType != "pets" {
    		t.Errorf("toys's OwnerType, expect: %v, got %v", "pets", expect.Toy.OwnerType)
    	}
    }
    
    func CheckUserUnscoped(t *testing.T, user User, expect User) {
    	doCheckUser(t, user, expect, true)
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/reflect/Types.java

      }
    
      /**
       * Returns a type where {@code rawType} is parameterized by {@code arguments} and is owned by
       * {@code ownerType}.
       */
      static ParameterizedType newParameterizedTypeWithOwner(
          @CheckForNull Type ownerType, Class<?> rawType, Type... arguments) {
        if (ownerType == null) {
          return newParameterizedType(rawType, arguments);
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  3. schema/relationship_test.go

    					Type:        schema.HasOne,
    					Schema:      "User",
    					FieldSchema: "Toy",
    					Polymorphic: Polymorphic{ID: "OwnerID", Type: "OwnerType", Value: "users"},
    					References: []Reference{
    						{ForeignKey: "OwnerType", ForeignSchema: "Toy", PrimaryValue: "users"},
    						{ForeignKey: "OwnerType", ForeignSchema: "Toy", PrimaryValue: "users"},
    					},
    				},
    				"Toys": {
    					Name:        "Toys",
    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)
  4. utils/tests/models.go

    	Number string
    }
    
    type Pet struct {
    	gorm.Model
    	UserID *uint
    	Name   string
    	Toy    Toy `gorm:"polymorphic:Owner;"`
    }
    
    type Toy struct {
    	gorm.Model
    	Name      string
    	OwnerID   string
    	OwnerType string
    }
    
    type Tools struct {
    	gorm.Model
    	Name     string
    	CustomID string
    	Type     string
    }
    
    type Company struct {
    	ID   int
    	Name string
    }
    
    type Language struct {
    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)
  5. android/guava/src/com/google/common/reflect/TypeToken.java

        return result;
      }
    
      private boolean isOwnedBySubtypeOf(Type supertype) {
        for (TypeToken<?> type : getTypes()) {
          Type ownerType = type.getOwnerTypeIfPresent();
          if (ownerType != null && of(ownerType).isSubtypeOf(supertype)) {
            return true;
          }
        }
        return false;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 53.6K bytes
    - Viewed (0)
  6. schema/schema_test.go

    		},
    		{
    			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}},
    		},
    		{
    			Name: "Company", Type: schema.BelongsTo, Schema: "User", FieldSchema: "Company",
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  7. schema/relationship.go

    //
    //	type User struct {
    //	  Toys []Toy `gorm:"polymorphic:Owner;"`
    //	}
    //	type Pet struct {
    //	  Toy Toy `gorm:"polymorphic:Owner;"`
    //	}
    //	type Toy struct {
    //	  OwnerID   int
    //	  OwnerType string
    //	}
    func (schema *Schema) buildPolymorphicRelation(relation *Relationship, field *Field) {
    	polymorphic := field.TagSettings["POLYMORPHIC"]
    
    	relation.Polymorphic = &Polymorphic{
    		Value: schema.Table,
    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)
Back to top