Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NestedRelationName (0.19 sec)

  1. utils/utils.go

    		return strconv.FormatUint(uint64(v), 10)
    	case uint64:
    		return strconv.FormatUint(v, 10)
    	}
    	return ""
    }
    
    const nestedRelationSplit = "__"
    
    // NestedRelationName nested relationships like `Manager__Company`
    func NestedRelationName(prefix, name string) string {
    	return prefix + nestedRelationSplit + name
    }
    
    // SplitNestedRelationName Split nested relationships to `[]string{"Manager","Company"}`
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. callbacks/query.go

    							tableAliasName := relation.Name
    							if parentTableName != clause.CurrentTable {
    								tableAliasName = utils.NestedRelationName(parentTableName, tableAliasName)
    							}
    
    							columnStmt := gorm.Statement{
    								Table: tableAliasName, DB: db, Schema: relation.FieldSchema,
    								Selects: join.Selects, Omits: join.Omits,
    							}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 10.1K bytes
    - Viewed (1)
Back to top