Skip to content

Default team will not work if primary key for user changes from id() to uuid() #218

@AngelinCalu

Description

@AngelinCalu
  • Jetstream Version: 1.2.1
  • Jetstream Stack: Livewire
  • Laravel Version: 8.4.0
  • PHP Version: 7.4.6
  • Database Driver & Version: Ver 15.1 Distrib 10.5.4-MariaDB, for Win64 (AMD64)

Description:

When user registers through the form everything works perfectly.
When I'm trying to log in with a user created with:

User::factory(50)->create();

I'm getting an ErrorException Trying to get property 'id' of non-object on currentTeam() function from
...\vendor\laravel\jetstream\src\HasTeams.php:28

Steps To Reproduce:

  • Create a fresh laravel instalation with the jetstream package (livewire stack)
  • Change the the primary key of the user from 'id' to 'uuid'
  • Update all the relevant foreign fields to match the change.
  • Create a new user through form registration -> This works normally.
  • Create a new user through model factory / seeder -> This will produce the error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy