One vague question, about moralis server

What these field means? What’s their meaning?

One user(end real user) map many wallet?

If so, why after I change username, only one record changed correspondingly?

image

import Moralis from "moralis";
import MoralisType from "moralis";
import { useState } from "react";
import CustomContainer from "../CustomContainer";
import {
  FormControl,
  Box,
  FormLabel,
  Text,
  Input,
  Button,
} from "@chakra-ui/react";

import { useMoralis } from "react-moralis";


type ProfileProps = {
  user: MoralisType.User<Moralis.Attributes> | null;
  account: string | null;
};

export default function Profile({ user, account }: ProfileProps) {
  const { isInitialized } = useMoralis();

  const [input, setInput] = useState("");

  const { setUserData, isUserUpdating } = useMoralis();

  if (isInitialized) {
    console.log("Profile.tsx => address : ", user?.get("ethAddress"), account);
  }
  return (
    <>
      <CustomContainer>
        <Text>
          <b> 😆 &nbsp; Username:</b>
          {user && user.get("username")}
        </Text>
        <Text>
          <b> 💰 &nbsp; Wallet:</b> {account}
        </Text>
        <form
          onSubmit={(e) => {
            console.log("input.trim() ======> ", input.trim());
            e.preventDefault();
            if (input.trim().length > 0) {
              setUserData({
                username: input,
              }).then(() => setInput(""));
            }
          }}
        >
          <FormControl>
            <FormLabel htmlFor="username">Set a new username</FormLabel>
            <Input
              id="username"
              placeholder="ex. Jesse"
              variant="filled"
              value={input}
              style={{ backgroundColor: "#edf2f7" }}
              onChange={(e) => setInput(e.target.value)}
            ></Input>
            <Button
              type="submit"
              mt="6"
              disabled={isUserUpdating}
              colorScheme="purple"
            >
              ✅ &nbsp;Change Username
            </Button>
          </FormControl>
        </form>
      </CustomContainer>
    </>
  );
}

Or, one wallet map one user? Look this.

And, I find https://docs.moralis.io/moralis-dapp/database/objects, but it’s a bit hard to read.

Every row in the user class will have a unique username and each row can be linked to many wallet addresses. So there can be many wallets for a username.

Check this doc on linking multiple addresses to one user.
https://docs.moralis.io/moralis-dapp/web3/web3#linking

If two are more wallets are not linked to one user then there will be multiple rows created with different usernames.