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

[Bug]: @me not replaced in transactions #495

Closed
taorepoara opened this issue Oct 24, 2023 · 1 comment · Fixed by #545
Closed

[Bug]: @me not replaced in transactions #495

taorepoara opened this issue Oct 24, 2023 · 1 comment · Fixed by #545
Assignees
Labels
bug Something isn't working hacktoberfest released

Comments

@taorepoara
Copy link
Member

taorepoara commented Oct 24, 2023

What happened?

I tried to create and query database documents using the @me but it's set as null instead of the user id.

To reproduce the problem replace this function (https://github.com/lenra-io/template-bun-ts/blob/1123885f2283fbf98beaf38ff40180c0eca5c682/src/listeners/systemEvents.ts#L29) by the next one:

async function createCounter(api: Api, user: string) {
    const transaction = await api.data.startTransaction();
    const counterColl = transaction.coll(Counter);
    let counters = await counterColl.find({ user });
    console.log(counters);
    if (counters.length == 0) {
        await counterColl.createDoc(new Counter(user, 0));
        return transaction.commit();
    }
    return transaction.abort();
}

What browsers are you seeing the problem on?

No response

Version

lenra/devtools latest 7790ca183815

Relevant log output

No response

@taorepoara taorepoara added bug Something isn't working hacktoberfest labels Oct 24, 2023
@shiipou shiipou self-assigned this Nov 2, 2023
@taorepoara taorepoara self-assigned this Jan 9, 2024
@taorepoara taorepoara linked a pull request Feb 7, 2024 that will close this issue
11 tasks
@taorepoara
Copy link
Member Author

🎉 This issue has been resolved in version 1.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants