Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk insertion error #244

Open
aygunbinici opened this issue Dec 14, 2024 · 0 comments
Open

Bulk insertion error #244

aygunbinici opened this issue Dec 14, 2024 · 0 comments

Comments

@aygunbinici
Copy link

What happened?

I am testing time in realm with local c++ and I want to record many records at once without a for loop but I could not succeed.

Repro steps

std::vectorrealm::Person people;

for (int i = 0; i < size; ++i) {
realm::Person person;
person._id = realm::object_id::generate();
person.name = "Person " + std::to_string(i + 1);
person.country = "Country " + std::to_string(i % 10);
people.push_back(std::move(person));
}

local_realm.write([&] {
local_realm.insert(people);
});

Version

main

Installation method

3.15

What Atlas Services are you using?

Local Database only

Compiler

Visual Studio 2022

OS and version

Windows 11 (Version 22H2)

Code snippets

No response

Stacktrace of the exception/crash you're getting

No response

Relevant log output

No response

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

No branches or pull requests

1 participant