Skip to content

Add support for JPA AOT Repositories #3830

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mp911de opened this issue Apr 8, 2025 · 0 comments
Closed

Add support for JPA AOT Repositories #3830

mp911de opened this issue Apr 8, 2025 · 0 comments
Assignees
Labels
theme: aot type: enhancement A general enhancement

Comments

@mp911de
Copy link
Member

mp911de commented Apr 8, 2025

Generate AOT query methods for the following query methods:

Supported Features

  • Derived query methods, @Query/@NativeQuery and named query methods
  • @Modifying methods returning void or int
  • @QueryHints support
  • Pagination, Slice, Stream, and Optional return types
  • Sort query rewriting
  • DTO Projections
  • Value Expressions (Those require a bit of reflective information.
    Mind that using Value Expressions requires expression parsing and contextual information to evaluate the expression)

Limitations

  • Configuration of escapeCharacter and queryEnhancerSelector are not yet considered
  • QueryRewriter must be a no-args class. QueryRewriter beans are not yet supported.
  • Methods accepting ScrollPosition (e.g. Keyset` pagination) are not yet supported

Excluded methods

  • CrudRepository and other base interface methods
  • Querydsl and Query by Example methods
  • Methods whose implementation would be overly complex
    • Methods accepting ScrollPosition (e.g. Keyset pagination)
    • Stored procedure query methods annotated with @Procedure
    • Dynamic projections
@mp911de mp911de self-assigned this Apr 8, 2025
@mp911de mp911de added type: enhancement A general enhancement theme: aot labels Apr 8, 2025
@mp911de mp911de added this to the 4.0 M2 (2025.1.0) milestone Apr 14, 2025
mp911de pushed a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
Introduce AotRepositoryFragmentSupport, adopt to FragmentCreationContext.
Reduce visibility. Refactor CodeBlocks builder. Simplify query rewriting and use base class methods.
Use typed verifier through a JDK proxy to avoid reflective frontend.
Revise testing to a plain old Spring test but testing the AOT fragment through its interface by forwarding reflective calls to the AOT fragment.
Refactor AotQuery into AotQueries to support a wider range of possible queries.

See #3830
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
Fix Like with starts/ends, use proper parameter origins instead of assuming binding name matches parameter names. Simplify binding block.

See #3830
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
Run AotMetamodel against live EntityManagerFactory, use Environment to check for AOT repository enabled flag.

See #3830
@mp911de mp911de closed this as completed Apr 14, 2025
mp911de added a commit that referenced this issue Apr 14, 2025
Run AotMetamodel against live EntityManagerFactory, use Environment to check for AOT repository enabled flag.

See #3830
mp911de pushed a commit that referenced this issue May 13, 2025
mp911de added a commit that referenced this issue May 13, 2025
Introduce AotRepositoryFragmentSupport, adopt to FragmentCreationContext.
Reduce visibility. Refactor CodeBlocks builder. Simplify query rewriting and use base class methods.
Use typed verifier through a JDK proxy to avoid reflective frontend.
Revise testing to a plain old Spring test but testing the AOT fragment through its interface by forwarding reflective calls to the AOT fragment.
Refactor AotQuery into AotQueries to support a wider range of possible queries.

See #3830
mp911de added a commit that referenced this issue May 13, 2025
mp911de added a commit that referenced this issue May 13, 2025
Fix Like with starts/ends, use proper parameter origins instead of assuming binding name matches parameter names. Simplify binding block.

See #3830
mp911de added a commit that referenced this issue May 13, 2025
mp911de pushed a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
Introduce AotRepositoryFragmentSupport, adopt to FragmentCreationContext.
Reduce visibility. Refactor CodeBlocks builder. Simplify query rewriting and use base class methods.
Use typed verifier through a JDK proxy to avoid reflective frontend.
Revise testing to a plain old Spring test but testing the AOT fragment through its interface by forwarding reflective calls to the AOT fragment.
Refactor AotQuery into AotQueries to support a wider range of possible queries.

See #3830
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
Fix Like with starts/ends, use proper parameter origins instead of assuming binding name matches parameter names. Simplify binding block.

See #3830
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
mp911de added a commit that referenced this issue May 15, 2025
Run AotMetamodel against live EntityManagerFactory, use Environment to check for AOT repository enabled flag.

See #3830
mp911de pushed a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
Introduce AotRepositoryFragmentSupport, adopt to FragmentCreationContext.
Reduce visibility. Refactor CodeBlocks builder. Simplify query rewriting and use base class methods.
Use typed verifier through a JDK proxy to avoid reflective frontend.
Revise testing to a plain old Spring test but testing the AOT fragment through its interface by forwarding reflective calls to the AOT fragment.
Refactor AotQuery into AotQueries to support a wider range of possible queries.

See #3830
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
Fix Like with starts/ends, use proper parameter origins instead of assuming binding name matches parameter names. Simplify binding block.

See #3830
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
mp911de added a commit that referenced this issue May 16, 2025
Run AotMetamodel against live EntityManagerFactory, use Environment to check for AOT repository enabled flag.

See #3830
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
theme: aot type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant