6

Spring JPA might be annoying sometimes...

public MyResult findFirstByIdentities_CompanyIdAndIdentities_UserIdAndFromDateAndToDateAndFormatAndIdentities_SourceAndStatusInAndCreatedOnAfterOrderByCreatedOnDesc(String companyId, String userId, Date fromDate, Date toDate, String format, String source, Collection<String> status, Date createdOn) {...}

I know I know, efficiency is weeping in a dark corner. Will deal with it later

Comments
  • 1
    What in the name of fuck is that abomination?
    Who thought this was a good idea?
  • 0
    @PrivateGER I did :) Well okay, I thought that was an idea. Prolly not the best one :)

    Spring-data can generate DB-specific SQL queries from method name. The whole project uses this feature and we by any means avoid using raw SQLs. And that's how this freak method was born :)
Add Comment