Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for POLYMORPHICTYPE (0.09 sec)

  1. schema/relationship.go

    }
    
    // hasPolymorphicRelation check if has polymorphic relation
    // 1. `POLYMORPHIC` tag
    // 2. `POLYMORPHICTYPE` and `POLYMORPHICID` tag
    func hasPolymorphicRelation(tagSettings map[string]string) bool {
    	if _, ok := tagSettings["POLYMORPHIC"]; ok {
    		return true
    	}
    
    	_, hasType := tagSettings["POLYMORPHICTYPE"]
    	_, hasId := tagSettings["POLYMORPHICID"]
    
    	return hasType && hasId
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. schema/schema_helper_test.go

    				}
    
    				if r.Polymorphic.PolymorphicType.Name != relation.Polymorphic.Type {
    					t.Errorf("schema %v relation's polymorphic type field expects %v, but got %v", s, relation.Polymorphic.Type, r.Polymorphic.PolymorphicType.Name)
    				}
    
    				if r.Polymorphic.Value != relation.Polymorphic.Value {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Dec 15 08:31:23 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top