Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 187 for userId (0.07 sec)

  1. tests/joins_test.go

    		CheckUser(t, user, users2[idx])
    	}
    }
    
    func TestJoinConds(t *testing.T) {
    	user := *GetUser("joins-conds", Config{Account: true, Pets: 3})
    	DB.Save(&user)
    
    	var users1 []User
    	DB.Joins("inner join pets on pets.user_id = users.id").Where("users.name = ?", user.Name).Find(&users1)
    	if len(users1) != 3 {
    		t.Errorf("should find two users using left join, but got %v", len(users1))
    	}
    
    	var users2 []User
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:58:13 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. schema/schema_test.go

    			}},
    			References: []Reference{{"ID", "User", "UserID", "UserSpeak", "", true}, {"Code", "Language", "LanguageCode", "UserSpeak", "", false}},
    		},
    		{
    			Name: "Friends", Type: schema.Many2Many, Schema: "User", FieldSchema: "User",
    			JoinTable: JoinTable{Name: "user_friends", Table: "user_friends", Fields: []schema.Field{
    				{
    					Name: "UserID", DBName: "user_id", BindNames: []string{"UserID"}, DataType: schema.Uint,
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jun 20 12:19:31 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. utils/tests/models.go

    	Friends   []*User    `gorm:"many2many:user_friends;"`
    	Active    bool
    }
    
    type Account struct {
    	gorm.Model
    	UserID sql.NullInt64
    	Number string
    }
    
    type Pet struct {
    	gorm.Model
    	UserID *uint
    	Name   string
    	Toy    Toy `gorm:"polymorphic:Owner;"`
    }
    
    type Toy struct {
    	gorm.Model
    	Name      string
    	OwnerID   string
    	OwnerType string
    }
    
    type Tools struct {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Dec 15 08:36:08 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/lang/StringUtilTest.java

            assertEquals("Abc", StringUtil.capitalize("abc"));
            assertEquals("Abc", StringUtil.capitalize("Abc"));
            assertEquals("ABC", StringUtil.capitalize("ABC"));
            assertEquals("UserId", StringUtil.capitalize("userId"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testDecapitalize() throws Exception {
            assertEquals("abc", StringUtil.decapitalize("abc"));
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 12K bytes
    - Viewed (0)
  5. tests/helper_test.go

    	}
    }
    
    func CheckUserUnscoped(t *testing.T, user User, expect User) {
    	doCheckUser(t, user, expect, true)
    }
    
    func CheckUser(t *testing.T, user User, expect User) {
    	doCheckUser(t, user, expect, false)
    }
    
    func doCheckUser(t *testing.T, user User, expect User, unscoped bool) {
    	if user.ID != 0 {
    		var newUser User
    		if err := db(unscoped).Where("id = ?", user.ID).First(&newUser).Error; err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 8K bytes
    - Viewed (0)
  6. internal/config/identity/openid/provider/keycloak.go

    	k.accessToken = accessToken
    	k.Unlock()
    	return nil
    }
    
    // LookupUser lookup user by their userid.
    func (k *KeycloakProvider) LookupUser(userid string) (User, error) {
    	req, err := http.NewRequest(http.MethodGet, k.adminURL, nil)
    	if err != nil {
    		return User{}, err
    	}
    	req.URL.Path = path.Join(req.URL.Path, "realms", k.realm, "users", userid)
    
    	k.Lock()
    	accessToken := k.accessToken
    	k.Unlock()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jul 14 18:12:07 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. internal/config/identity/openid/openid.go

    		}
    		if err == provider.ErrAccessTokenExpired {
    			if err = pCfg.provider.LoginWithClientID(pCfg.ClientID, pCfg.ClientSecret); err != nil {
    				return user, err
    			}
    			user, err = pCfg.provider.LookupUser(userid)
    		}
    		return user, err
    	}
    	// Without any specific logic for a provider, all accounts
    	// are always enabled.
    	return provider.User{ID: userid, Enabled: true}, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jul 10 20:16:44 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. schema/relationship_test.go

    	type User struct {
    		ID        int32 `gorm:"primaryKey"`
    		Name      string
    		CreatorID *int32
    		Creator   *User
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Creator", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User",
    		References: []Reference{{"ID", "User", "CreatorID", "User", "", false}},
    	})
    }
    
    func TestSelfReferentialBelongsToOverrideReferences(t *testing.T) {
    	type User struct {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/lang/StringUtil.java

        }
    
        /**
         * JavaBeansの仕様にしたがってデキャピタライズを行ないます。大文字が2つ以上続く場合は、小文字にならないので注意してください。
         * <p>
         * 次のように使います.
         * </p>
         *
         * <pre>
         * StringUtil.capitalize("UserId")  = "userId"
         * StringUtil.capitalize("ABC")  = "ABC"
         * </pre>
         *
         * @param name
         *            名前
         * @return 結果の文字列
         */
        public static String decapitalize(final String name) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 21.7K bytes
    - Viewed (0)
  10. internal/config/identity/openid/provider/provider.go

    )
    
    // Provider implements identity provider specific admin operations, such as
    // looking up users, fetching additional attributes etc.
    type Provider interface {
    	LoginWithUser(username, password string) error
    	LoginWithClientID(clientID, clientSecret string) error
    	LookupUser(userid string) (User, error)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 2.7K bytes
    - Viewed (0)
Back to top