Add jakarta-data module: Jakarta Data repositories on Hibernate 7.4 / 8.0 CR2 vs Spring Data JPA 4.2
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4XrpfdpsacrvqnrBM
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.ankurm.data;
|
||||
|
||||
import jakarta.data.repository.Find;
|
||||
import jakarta.data.repository.OrderBy;
|
||||
import jakarta.data.repository.Repository;
|
||||
import org.hibernate.StatelessSession;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** "year" is not an attribute of Book (it is publishedYear). */
|
||||
@Repository
|
||||
public interface BadOrderBy {
|
||||
StatelessSession session();
|
||||
|
||||
@Find
|
||||
@OrderBy("year")
|
||||
List<Book> byAuthor(String author);
|
||||
}
|
||||
Reference in New Issue
Block a user