Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. schema/schema.go

    	if _, embedded := schema.cacheStore.Load(embeddedCacheKey); !embedded {
    		for _, field := range schema.Fields {
    			if field.DataType == "" && (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
    				}
    			}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 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,
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
Back to top