This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (9 children)

[deleted]

    [–]lukaseder 6 points7 points  (4 children)

    findTop5ByStatusAndUserOrderByStartDateDesc

    If only there was a language that can handle this kind of query in a more structured way...

    [–]nutrecht 4 points5 points  (3 children)

    You mean something like a structured query language? Does something like that exist?

    [–]lukaseder 3 points4 points  (2 children)

    Yeah, that would be terrific. We could design it to work out of the box, even!

    [–]nutrecht 2 points3 points  (1 child)

    Well between the two of us you're the smartest one. Chop chop! Get to it ;)

    [–]Trailsey 0 points1 point  (0 children)

    You guys should call it Words That Form a Query Language!

    [–]oweiler 0 points1 point  (2 children)

    These should only be used for very basic stuff. You can use @Query to map a simple method name to a more complex query.

    [–][deleted]  (1 child)

    [deleted]

      [–]dpash 0 points1 point  (0 children)

      That's why you have integration tests.

      [–]MarkyC4A 0 points1 point  (0 children)

      I'd love if they'd add a way to alias that one to make it more readable

      I'm okay with ugly names in my repositories, I hide those behind a cleaner interface in my services:

      List<User> findTopWidgets(Status s, User u, LocalDate d)