I know spring data jpa can execute sql by two ways.One is execute sql which is included by @Query, the other is parse method name and generate sql. I clone the source code of spring data jpa from github and want to find how spring data generate sql according to method name.But I can't find the class which is related to parse method name.So,could you tell me something about how spring data jpa works about parsing method name?Thanks
相关问题
- Spring Data MongoDB - lazy access to some fields
- SpringData JPA hibernate collection for IN keyword
- R2DBC and enum (PostgreSQL)
- Spring boot Autowired repository not working with
- How are fields set on an entity by Spring Data Mon
相关文章
- Writing CRUDRepository's findBy() method on a
- Two foreign keys as primary key
- case insensitive sort using spring data
- Spring Session Data Redis - Get Valid Sessions, Cu
- Spring Data (JPA) - using generics in @Query
- Could not create query metamodel for method public
- UserDefinedType not found by spring-data-cassandra
- Collection based multi tenancy in spring data mong
Its a multi-step process:
PartTree
instance for each repository method using thePartTreeJpaQuery
class. ThePartTree
class is part of the Spring Data Commons module, which is a dependency for the store-specific Spring Data modules (like the Spring Data JPA module).PartTree
is then passed to aJpaQueryCreator
to generate a JPACriteriaQuery
instance.CriteriaQuery
instance is passed to the underlying JPA provider (Hibernate, OpenJPA, EclipseLink, etc.) which then generates SQL to be executed.