Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for POLYMORPHICTYPE (0.15 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 Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Aug 18 11:44:52 UTC 2025
    - 23.1K bytes
    - Viewed (1)
  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 Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Aug 28 02:57:17 UTC 2025
    - 7.5K bytes
    - Viewed (0)
Back to top