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

Default SetOptions should be OVERWRITE #81

Open
johannesnormannjensen opened this issue Jun 17, 2019 · 1 comment
Open

Default SetOptions should be OVERWRITE #81

johannesnormannjensen opened this issue Jun 17, 2019 · 1 comment

Comments

@johannesnormannjensen
Copy link

When setting a POJO the default SetOptions should be OVERWRITE so that Firestore conventions are followed

@rojepp
Copy link

rojepp commented Jul 12, 2023

There seems to be no way of creating a SetOptions with merge = false? So this library would need to call another overload instead of passing SetOptions.merge()?
But this library is dead, right?

The bug should be here: https://github.com/FrangSierra/RxFirebase/blob/master/app/src/main/java/durdinapps/rxfirebase2/RxFirestore.java#L449

If anyone is stuck on this, I solved the problem locally by just doing what RxFirestore.set does internally:

   fun saveDeviceStatusOnline(d: FSDevice): Completable {
       val col = collection("client_info")
       val document = col.document(d.getDocumentPath())

       //return RxFirestore.setDocument(document, d).subscribeOn(Schedulers.io())
       return Completable.create { emitter ->
           RxCompletableHandler.assignOnTask<Void>(
               emitter,
               document.set(d)
           )
       }.subscribeOn(Schedulers.io())
   }

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

2 participants