Giter Site home page Giter Site logo

Comments (8)

sammefford avatar sammefford commented on June 12, 2024

I was going to change it to deleteAll(String... collections), but I see now I can't do that since the REST API doesn't support multiple collections on delete. If I provided deleteAll(String collection) I could delete any document in the database in that collection, but I expect the pojo facade to limit to only the types of documents managed by the pojo facade, and not delete documents unmanaged by the pojo facade whether they're in the matching collection or not. The best way is to filter to documents in a collection added by the pojoFacade but I can't provide two collection args to the REST DELETE /search endpoint. So for now I'm limiting this down to deleteAll() and it will just send the one collection auto-added by the pojo facade. This has the advantage of never deleting a document not managed by the pojo facade, and facilitating deletion of all docs managed by the pojo facade.

I'll mark this issue as closed. Please re-open if you have a concern about this solution.

from java-client-api.

collwhit avatar collwhit commented on June 12, 2024

Sam, if you need changes at the REST layer to support what you need to do in the Java interface, we should be talking about that. I think your conclusion is reasonable; just saying that you shouldn't assume you can't get an enhancement if you need it.

from java-client-api.

sammefford avatar sammefford commented on June 12, 2024

I would like the enhancement. I added an RFE.

from java-client-api.

grechaw avatar grechaw commented on June 12, 2024

If we don't implement this, then people cannot use the pojo facade with objects that use String IDs. I think that's pretty serious actually! I like Sam's solution to the problem. Do you think it's just too late to fix for 8.0-1? I need to change my implementation in Samplestack (just a little though) if we're not fixing this.

from java-client-api.

sammefford avatar sammefford commented on June 12, 2024

Charles, I'm not understanding your comment. I added a deleteAll() method with no args that deletes all docs for the class managed by the PojoRepository. We still have the delete(ID id) method. So the only thing we're waiting for is deleteAll(String... collection) which I consider a convenience, not something that prevents people from using the pojo facade.

from java-client-api.

grechaw avatar grechaw commented on June 12, 2024

Sorry I misunderstood the work already done. In that case I'm in good shape! The important thing is that delete(String...) doesn't exist anymore

from java-client-api.

sammefford avatar sammefford commented on June 12, 2024

Yeah, I should have clarified that delete(String...) doesn't exist anymore. I agree that was ambiguous. I'm confused why the Java compiler allows me to get away with such ambiguity. But thanks for finding it so I could fix it!

from java-client-api.

grechaw avatar grechaw commented on June 12, 2024

Well to be fair the "ambiguous" problem WAS a compiler error ... but only if your class uses String for .

from java-client-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.