Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

How to get EntityName$ #306

Closed
hendisantika opened this issue Mar 13, 2023 · 3 comments
Closed

How to get EntityName$ #306

hendisantika opened this issue Mar 13, 2023 · 3 comments
Assignees

Comments

@hendisantika
Copy link

hendisantika commented Mar 13, 2023

I try on my local is always error

 @GetMapping
    public ResponseEntity<?> findAllBooks() {
        return ResponseEntity.ok(
                jpaStreamer.stream(Book.class)
                        .sorted(Book$.id.reversed())
                        .collect(Collectors.toList()));
    }

Where we can get Book$.

(Film$ is automatically generated from the Film-table Entity at compile-time by JPAstreamer).

But when I try to run the app is error

Here is my repository link: https://github.com/hendisantika/spring-boot-data-jpastreamer

Thanks

@julgus
Copy link
Member

julgus commented Mar 17, 2023

I see you are using the annotation jakarta.persistence.Entity in your Author and Book classes. The annotation processor does not currently support JPA3 and thus only processes entities annotated with javax.persistence.Entity. We are in the process of issuing a JPA3 compatible version (#299), but we are holding it to include projection optimisations in the same release.

If you wish to use JPA3 today you can check out the sources on the branch jpa3 and build it locally until the release is out. Another option would be to use JPA2 for now.

Hope that helps.

@julgus julgus self-assigned this Mar 17, 2023
@julgus
Copy link
Member

julgus commented Mar 17, 2023

Closing as this is covered by #299.

@julgus julgus closed this as completed Mar 17, 2023
@hendisantika
Copy link
Author

OK. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants