Git Product home page Git Product logo

Comments (5)

spring-projects-issues avatar spring-projects-issues commented on May 2, 2024

Oliver Drotbohm commented

Fixed with d108bc9

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 2, 2024

Oliver Drotbohm commented

I implemented the fix for a Specification not returning any object. This will result in null being returned now. However I haven't changed the code to implement an arbitrary result in case of multiple objects being returned as we don't have no control over the ordering in that case so that multiple calls to the same data store could result in differing results.

Would it suit you simply calling findAll(Specification spec) and use the first one returned?

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 2, 2024

Oruganti Shanker commented

Yes, what you propose is the best solution. There will be a difference in the findOne behavior when using MongoDB vs Oracle, but we can't avoid a few such differences (;-))

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 2, 2024

Oliver Drotbohm commented

Well I think we could restrict the MongoDB version of findOne(…) to align to that convention. So we would stay consistent and could outline the way I proposed in the comment above in the documentation as a workaround

from spring-data-jpa.

spring-projects-issues avatar spring-projects-issues commented on May 2, 2024

Oruganti Shanker commented

I would say we leave things the way they are now. The Mongo users of the API would expect findOne to return one object, as the Mongo API does. So the best way is to have findOne return what the Mongo API returns.

from spring-data-jpa.

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.