Skip to content

FR: Transaction Set/Create document issue #257

@romanmen

Description

@romanmen

Hi,

My project is uses in node js code that using firebase-admin package.
According to business logic of my project I need use in transaction set mechanism of firestore but I can't receive the WriteResult of firestore like in the regular (non transaction) set.
Regular Set returns Promise with Write Time value.

I needs same value from firestore by transaction.set.

Can some one help me how can I receive it ? Maybe my approach isn't correct and you will be able help with another approach.

Node JS Code Sample:

transactionSetDocument(id, docContent)
{
return this.db.runTransaction(transaction =>
{
let docRef = this.db.collection('MyCollection').doc(${id});
transaction.set(docRef, docContent, { merge: true });
//set document doesn't return the Promise with WriteResult, so how can I obtain this data
}
}

Thanks,
Roman

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions