Skip to content

Transaction set fails #77

@ConschiB

Description

@ConschiB

First of all, really happy that transactions are now available in this package! Thanks a lot.

Describe the bug
When executing transaction.set(), the transaction crashes with following message:

'({(QueryDocumentSnapshot<Map<String, Object?>>) => Map<String, Object?> fromFirestore, (Map<String, Object?>) => Map<String, Object?> toFirestore})' is not a subtype of type '({(QueryDocumentSnapshot<Map<String, Object?>>) => dynamic fromFirestore, (dynamic) => Map<String, Object?> toFirestore})'

To Reproduce

await firestore.runTransaction((transaction) async {
    var otherIdDoc= await transaction.get(otherIdReference);
    transaction.update(otherIdReference, {'count': FieldValue.increment(1)});
    transaction.set(docRef, {'testkey': 'testvalue'});
    }

Expected behavior
Expected, that the transaction works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions