Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for has_one (0.14 sec)

  1. schema/relationship.go

    		}
    
    		switch field.IndirectFieldType.Kind() {
    		case reflect.Struct:
    			relation.Type = HasOne
    		case reflect.Slice:
    			relation.Type = HasMany
    		}
    	}
    
    	if schema.err == nil {
    		schema.setRelation(relation)
    		switch relation.Type {
    		case HasOne:
    			schema.Relationships.HasOne = append(schema.Relationships.HasOne, relation)
    		case HasMany:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. subprojects/core/src/test/groovy/org/gradle/api/internal/attributes/HierarchicalAttributeContainerTest.groovy

            new HierarchicalAttributeContainer(attributesFactory, hasBoth, hasNone) != new HierarchicalAttributeContainer(attributesFactory, hasNone, hasBoth)
            new HierarchicalAttributeContainer(attributesFactory, hasBoth, hasNone) != new HierarchicalAttributeContainer(attributesFactory, hasBoth, hasOne)
            new HierarchicalAttributeContainer(attributesFactory, hasNone, hasBoth) != new HierarchicalAttributeContainer(attributesFactory, hasOne, hasBoth)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 27 04:00:15 UTC 2022
    - 8.7K bytes
    - Viewed (0)
  3. schema/relationship_test.go

    		UserRefer uint
    	}
    
    	type User struct {
    		gorm.Model
    		Profile Profile `gorm:"ForeignKey:UserRefer"`
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Profile", Type: schema.HasOne, Schema: "User", FieldSchema: "Profile",
    		References: []Reference{{"ID", "User", "UserRefer", "Profile", "", true}},
    	})
    }
    
    func TestHasOneOverrideReferences(t *testing.T) {
    	type Profile struct {
    		gorm.Model
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  4. tests/associations_has_one_test.go

    		t.Errorf("account's number should not be saved")
    	}
    }
    
    func TestHasOneAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasone-1", Config{Account: true}),
    		*GetUser("slice-hasone-2", Config{Account: false}),
    		*GetUser("slice-hasone-3", Config{Account: true}),
    	}
    
    	DB.Create(&users)
    
    	// Count
    	AssertAssociationCount(t, users, "Account", 2, "")
    
    	// Find
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  5. src/os/user/user_test.go

    // license that can be found in the LICENSE file.
    
    package user
    
    import (
    	"os"
    	"testing"
    )
    
    var (
    	hasCgo  = false
    	hasUSER = os.Getenv("USER") != ""
    	hasHOME = os.Getenv("HOME") != ""
    )
    
    func checkUser(t *testing.T) {
    	t.Helper()
    	if !userImplemented {
    		t.Skip("user: not implemented; skipping tests")
    	}
    }
    
    func TestCurrent(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 21 15:59:43 UTC 2023
    - 4K bytes
    - Viewed (0)
  6. platforms/software/ivy/src/integTest/groovy/org/gradle/api/publish/ivy/IvyPublishArtifactCustomizationIntegTest.groovy

            ivy.expectArtifact('ivyPublish', 'txt').hasType("txt").hasConf(null)
            ivy.expectArtifact('ivyPublish', 'html').hasType("html").hasConf(null)
            ivy.expectArtifact('ivyPublish', 'jar').hasType("jar").hasConf(null)
            ivy.expectArtifact('ivyPublish', 'reg').hasType("reg").hasConf(null)
            ivy.expectArtifact('ivyPublish', 'foo').hasType("foo").hasConf(null)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 14:02:46 UTC 2023
    - 18.3K bytes
    - Viewed (0)
  7. platforms/software/ivy/src/integTest/groovy/org/gradle/api/publish/ivy/IvyPublishFeaturesJavaIntegTest.groovy

            javaLibrary.parsedIvy.dependencies['org:optionaldep-g1:1.0'].hasConf('optionalFeature1RuntimeElements->default')
            javaLibrary.parsedIvy.dependencies['org:optionaldep1-g2:1.0'].hasConf('optionalFeature2RuntimeElements->default')
            javaLibrary.parsedIvy.dependencies['org:optionaldep2-g2:1.0'].hasConf('optionalFeature2RuntimeElements->default')
    
            and:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 14:02:46 UTC 2023
    - 18.7K bytes
    - Viewed (0)
  8. internal/s3select/sql/timestampfuncs.go

    	_, zoneOffset := t.Zone()
    	hasZone := zoneOffset != 0
    	hasFracSecond := t.Nanosecond() != 0
    	hasSecond := t.Second() != 0
    	hasTime := t.Hour() != 0 || t.Minute() != 0
    	hasDay := t.Day() != 1
    	hasMonth := t.Month() != 1
    
    	switch {
    	case hasFracSecond:
    		return t.Format(layoutNanosecond)
    	case hasSecond:
    		return t.Format(layoutSecond)
    	case hasTime || hasZone:
    		return t.Format(layoutMinute)
    	case hasDay:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  9. platforms/software/ivy/src/integTest/groovy/org/gradle/api/publish/ivy/IvyPublishFeaturesJavaPluginIntegTest.groovy

                dependency('org', 'optionaldep', '1.0')
                noMoreDependencies()
            }
            javaLibrary.parsedIvy.dependencies.size() == 1
            javaLibrary.parsedIvy.dependencies['org:optionaldep:1.0'].hasConf('featureRuntimeElements->default')
    
            and:
            resolveArtifacts(javaLibrary) { expectFiles "publishTest-1.9.jar" }
            resolveApiArtifacts(javaLibrary) { expectFiles "publishTest-1.9.jar" }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Dec 01 19:59:45 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  10. src/net/netip/inlining_test.go

    		got[strings.TrimPrefix(string(match), " can inline ")] = true
    		return nil
    	})
    	wantInlinable := []string{
    		"(*uint128).halves",
    		"Addr.BitLen",
    		"Addr.hasZone",
    		"Addr.Is4",
    		"Addr.Is4In6",
    		"Addr.Is6",
    		"Addr.IsInterfaceLocalMulticast",
    		"Addr.IsValid",
    		"Addr.IsUnspecified",
    		"Addr.Less",
    		"Addr.Unmap",
    		"Addr.Zone",
    		"Addr.v4",
    		"Addr.v6",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 2K bytes
    - Viewed (0)
Back to top