skip to content

Repository Programming Model (Commons)

The store-agnostic core: the repository interface hierarchy, how proxies are generated, query derivation from method names, custom fragments, Query by Example and Querydsl, and is-new detection. Understanding this layer is what lets you answer 'where does the implementation come from'.

part ofSpring Frameworkread it →
on this pageshow

explore

questions

page 2 of 2

As a tech lead, when do you push back on derived query methods, and what are the design tradeoffs versus explicit queries?

level: principalimportance: nice to knowfreq 20%

basics

~20 s

Use derivation for simple, readable lookups. Push back when method names get long or need joins, grouping, functions, or complex OR logic — those belong in an explicit @Query or a custom fragment, which are clearer and testable.

open as a page

showing 31–31 of 31