Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for foreignFields (0.19 sec)

  1. schema/relationship.go

    	// build references
    	for idx, foreignField := range foreignFields {
    		// use same data type for foreign keys
    		if copyableDataType(primaryFields[idx].DataType) {
    			foreignField.DataType = primaryFields[idx].DataType
    		}
    		foreignField.GORMDataType = primaryFields[idx].GORMDataType
    		if foreignField.Size == 0 {
    			foreignField.Size = primaryFields[idx].Size
    		}
    
    		relation.References = append(relation.References, &Reference{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  2. callbacks/preload.go

    				foreignFields = append(foreignFields, ref.PrimaryKey)
    			} else if ref.PrimaryValue != "" {
    				tx = tx.Where(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue})
    			} else {
    				relForeignKeys = append(relForeignKeys, ref.PrimaryKey.DBName)
    				relForeignFields = append(relForeignFields, ref.PrimaryKey)
    				foreignFields = append(foreignFields, ref.ForeignKey)
    			}
    		}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. callbacks/delete.go

    				)
    
    				for _, ref := range rel.References {
    					if ref.OwnPrimaryKey {
    						foreignFields = append(foreignFields, ref.PrimaryKey)
    						relForeignKeys = append(relForeignKeys, ref.ForeignKey.DBName)
    					} else if ref.PrimaryValue != "" {
    						queryConds = append(queryConds, clause.Eq{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Feb 25 02:48:23 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  4. association.go

    		if association.Unscope && rel.Type == schema.BelongsTo {
    			var foreignFields []*schema.Field
    			for _, ref := range rel.References {
    				if !ref.OwnPrimaryKey {
    					foreignFields = append(foreignFields, ref.ForeignKey)
    				}
    			}
    			if _, fvs := schema.GetIdentityFieldValuesMap(association.DB.Statement.Context, reflectValue, foreignFields); len(fvs) > 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu May 04 11:30:45 GMT 2023
    - 21.2K bytes
    - Viewed (0)
Back to top