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

document.get() does not support argument 'transactions' #72

Open
agherasim opened this issue Jul 9, 2023 · 5 comments
Open

document.get() does not support argument 'transactions' #72

agherasim opened this issue Jul 9, 2023 · 5 comments

Comments

@agherasim
Copy link

agherasim commented Jul 9, 2023

Reference:

def get(self, field_path: str) -> Any:

While mocking fireo ORM, get queries cannot execute due to missing transactions argument for document.get() method. Google Firestore v1 library provides transactions argument: https://github.com/googleapis/python-firestore/blob/2d42731996586fd63e9b8453b0eb627d3e23a310/google/cloud/firestore_v1/document.py#L362

agherasim pushed a commit to agherasim/python-mock-firestore that referenced this issue Jul 9, 2023
agherasim pushed a commit to agherasim/python-mock-firestore that referenced this issue Jul 9, 2023
@ignasbol
Copy link

Having the same issue. @agherasim your solution works. Should also update get in DocumentReference class as well, if you are planning to use transaction with references.

@agherasim
Copy link
Author

@ignasbol forgot to merge the changes. I pushed the changes addressing DocumentReference, querying works now as well.

@agherasim
Copy link
Author

@mdowds would you be able to review this PR and merge the changes?

@agherasim agherasim changed the title document.get() does not support argumet 'transactions' document.get() does not support argument 'transactions' Nov 3, 2023
@alexjolig
Copy link

alexjolig commented Feb 19, 2024

@mdowds Please checkout this PR. I really need this fix to solve this issue in our project.

@agherasim
Copy link
Author

@alexjolig, this repo seems unmaintained, unfortunately. What I ended up doing was to create a fork of it, fix issues, and use it as a local dependency.

janhn added a commit to behavio/python-mock-firestore that referenced this issue Nov 19, 2024
janhn added a commit to behavio/python-mock-firestore that referenced this issue Nov 19, 2024
janhn added a commit to behavio/python-mock-firestore that referenced this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants