Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for has_one (0.1 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: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  2. 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: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

          Segment<Object, Object, ?, ?> segment = map.segments[0];
    
          Object keyOne = new Object();
          Object valueOne = new Object();
          int hashOne = map.hash(keyOne);
          InternalEntry<Object, Object, ?> entryOne = segment.newEntryForTesting(keyOne, hashOne, null);
          WeakValueReference<Object, Object, ?> valueRefOne =
              segment.newWeakValueReferenceForTesting(entryOne, valueOne);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MapMakerInternalMapTest.java

          Segment<Object, Object, ?, ?> segment = map.segments[0];
    
          Object keyOne = new Object();
          Object valueOne = new Object();
          int hashOne = map.hash(keyOne);
          InternalEntry<Object, Object, ?> entryOne = segment.newEntryForTesting(keyOne, hashOne, null);
          WeakValueReference<Object, Object, ?> valueRefOne =
              segment.newWeakValueReferenceForTesting(entryOne, valueOne);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 35.1K bytes
    - Viewed (0)
  5. 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: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

          LocalCache<Object, Object> map = makeLocalCache(builder);
    
          Object keyOne = new Object();
          Object valueOne = new Object();
          int hashOne = map.hash(keyOne);
          ReferenceEntry<Object, Object> entryOne = map.newEntry(keyOne, hashOne, null);
          ValueReference<Object, Object> valueRefOne = map.newValueReference(entryOne, valueOne, 1);
          assertSame(valueOne, valueRefOne.get());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 110.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/LocalCacheTest.java

          LocalCache<Object, Object> map = makeLocalCache(builder);
    
          Object keyOne = new Object();
          Object valueOne = new Object();
          int hashOne = map.hash(keyOne);
          ReferenceEntry<Object, Object> entryOne = map.newEntry(keyOne, hashOne, null);
          ValueReference<Object, Object> valueRefOne = map.newValueReference(entryOne, valueOne, 1);
          assertSame(valueOne, valueRefOne.get());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K 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 Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/smb1/SmbComTransactionResponse.java

        byte subCommand;
        boolean hasMore = true;
        boolean isPrimary = true;
        byte[] txn_buf;
    
        /* for doNetEnum and doFindFirstNext */
        int status;
        int numEntries;
        FileEntry[] results;
    
        SmbComTransactionResponse() {
            txn_buf = null;
        }
    
        void reset() {
            super.reset();
            bufDataStart = 0;
            isPrimary = hasMore = true; 
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 6K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb1/trans/SmbComTransactionResponse.java

        public void reset () {
            super.reset();
            this.bufDataStart = 0;
            this.isPrimary = this.hasMore = true;
            this.parametersDone = this.dataDone = false;
        }
    
    
        @Override
        public boolean hasMoreElements () {
            return this.errorCode == 0 && this.hasMore;
        }
    
    
        @Override
        public SmbComTransactionResponse nextElement () {
            if ( this.isPrimary ) {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 9.2K bytes
    - Viewed (0)
Back to top