Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GormDataType (0.29 sec)

  1. schema/field.go

    		} else if strings.ToUpper(v) == "MILLI" {
    			field.AutoUpdateTime = UnixMillisecond
    		} else {
    			field.AutoUpdateTime = UnixSecond
    		}
    	}
    
    	if field.GORMDataType == "" {
    		field.GORMDataType = field.DataType
    	}
    
    	if val, ok := field.TagSettings["TYPE"]; ok {
    		lowerVal := DataType(strings.ToLower(val))
    		switch lowerVal {
    		case Bool, Int, Uint, Float, String, Time, Bytes:
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 32K bytes
    - Viewed (0)
  2. schema/relationship.go

    		// use same data type for foreign keys
    		if copyableDataType(primaryKeyField.DataType) {
    			relation.Polymorphic.PolymorphicID.DataType = primaryKeyField.DataType
    		}
    		relation.Polymorphic.PolymorphicID.GORMDataType = primaryKeyField.GORMDataType
    		if relation.Polymorphic.PolymorphicID.Size == 0 {
    			relation.Polymorphic.PolymorphicID.Size = primaryKeyField.Size
    		}
    
    		relation.References = append(relation.References, &Reference{
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Aug 18 11:44:52 UTC 2025
    - 23.1K bytes
    - Viewed (1)
  3. gorm.go

    		f := joinSchema.LookUpField(ref.ForeignKey.DBName)
    		if f == nil {
    			return fmt.Errorf("missing field %s for join table", ref.ForeignKey.DBName)
    		}
    
    		f.DataType = ref.ForeignKey.DataType
    		f.GORMDataType = ref.ForeignKey.GORMDataType
    		if f.Size == 0 {
    			f.Size = ref.ForeignKey.Size
    		}
    		ref.ForeignKey = f
    	}
    
    	for name, rel := range relation.JoinTable.Relationships.Relations {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 26 06:24:29 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  4. schema/schema.go

    			schema.FieldsWithDefaultDBValue = append(schema.FieldsWithDefaultDBValue, field)
    		}
    
    		if !embedded {
    			if field.DataType == "" && field.GORMDataType == "" && (field.Creatable || field.Updatable || field.Readable) {
    				relationshipFields = append(relationshipFields, field)
    				schema.FieldsByName[field.Name] = field
    				schema.FieldsByBindName[field.BindName()] = field
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Aug 19 06:35:49 UTC 2025
    - 12.9K bytes
    - Viewed (0)
Back to top