Skip to content

setQueryOption in insertMulti only works for first record #1053

@schweizersolutions

Description

@schweizersolutions

If I set the query option to IGNORE then it will only run for the first array:
$db->setQueryOption('IGNORE')->insertMulti('users', $data)

The insertMulti() calls the insert() method for each array.
After the first run it calls the reset() method in _prepareQuery().

And the query options becomes empty for the next arrays:
$this->_queryOptions = array();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions