Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseRelation (0.13 sec)

  1. schema/schema.go

    		for _, field := range schema.Fields {
    			if field.DataType == "" && field.GORMDataType == "" && (field.Creatable || field.Updatable || field.Readable) {
    				if schema.parseRelation(field); schema.err != nil {
    					return schema, schema.err
    				} else {
    					schema.FieldsByName[field.Name] = field
    					schema.FieldsByBindName[field.BindName()] = field
    				}
    			}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jun 20 12:19:31 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. schema/relationship.go

    	PolymorphicType *Field
    	Value           string
    }
    
    type Reference struct {
    	PrimaryKey    *Field
    	PrimaryValue  string
    	ForeignKey    *Field
    	OwnPrimaryKey bool
    }
    
    func (schema *Schema) parseRelation(field *Field) *Relationship {
    	var (
    		err        error
    		fieldValue = reflect.New(field.IndirectFieldType).Interface()
    		relation   = &Relationship{
    			Name:        field.Name,
    			Field:       field,
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
Back to top