Skip to content

Fresh user::with('wallet') Transaction failed exception: UUID Duplicate entry #438

@DanielSpravtsev

Description

@DanielSpravtsev

Hey! Just upgraded from 6.* version to 8.0.2 and getting following error when trying to load just created users(without wallets) with eager loading of wallets
Repo with reproduced error: https://github.com/DanielSpravtsev/money-test ( routes )

      throw new TransactionFailedException(
                'Transaction failed',
                ExceptionInterface::TRANSACTION_FAILED,
                $throwable
            );
        }
        
# For second user =>
        Integrity constraint violation: 1062 Duplicate entry 'a973ea92-722c-4656-90b6-3ddbd90756ca' for key 'wallets.wallets_uuid_unique' (SQL: insert into `wallets` (`balance`, `decimal_places`, `holder_id`, `holder_type`, `name`, `slug`, `meta`, `uuid`, `updated_at`, `created_at`) values (0, 2, 148, App\\Models\\User, Default Wallet, default, [], a973ea92-722c-4656-90b6-3ddbd90756ca, 2022-02-17 20:54:47, 2022-02-17 20:54:47))

Metadata

Metadata

Assignees

Labels

StalebugSomething isn't workingenhancementNew feature or requestgood issueGood for newcomersquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions