Skip to content

Bug: testMode() does not work with upsert() #6687

Closed

Description

@kenjis

Related: #6600

The following code does not work.

        $userData = [
            'email'   => 'upsertone@test.com',
            'name'    => 'Upsert One',
            'country' => 'US',
        ];
        $builder = $this->db->table('user');
        $builder->testMode()->upsert($userData);
        $sql = $builder->getCompiledUpsert();
CodeIgniter\Database\Exceptions\DatabaseException : setData() has no data.

Activity

  1. added
    bugVerified issues on the current code behavior or pull requests that will fix them
    databaseIssues or pull requests that affect the database layer
    on Oct 14, 2022
  2. kenjis commented on Oct 19, 2022

    @kenjis
    MemberAuthor

    Fixed by #6697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themdatabaseIssues or pull requests that affect the database layer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions