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

Cannot generate $ icon files under annotations folder of generated-sources #359

Closed
Rapter1990 opened this issue Jul 13, 2023 · 4 comments
Closed
Assignees
Labels
question Further information is requested
Projects

Comments

@Rapter1990
Copy link

I tried to implement an example of Spring Boot with the usage of jpaStreamer. I use Intellij Idea to handle with it. I have a problem in jpaStreamer.stream.

Here are the dependencies shown below

<jpastream.version>1.1.4</jpastream.version>

<dependency>
	<groupId>com.speedment.jpastreamer</groupId>
	<artifactId>jpastreamer-core</artifactId>
	<version>${jpastream.version}</version>
</dependency>

<dependency>
	<groupId>com.speedment.jpastreamer.integration.spring</groupId>
	<artifactId>spring-boot-jpastreamer-autoconfigure</artifactId>
	<version>${jpastream.version}</version>
</dependency>

Here is the sample method of UserService shown below

public List<User> findAllForJpaStreamer() {
   return jpaStreamer.stream(User.class).
          sorted(User$.id).
          collect(Collectors.toList());
}

I get this error message shown below

Cannot resolve symbol 'User$'

Here is the screenshot shown below

enter image description here

enter image description here

How can I fix it?

Here is the repo : Link

@julgus
Copy link
Member

julgus commented Jul 13, 2023

I cannot see that you have a User Entity, I only find a Person Entity. JPAStreamer only generates entities from the existing JPA model that you have.

I also note that the Person class is using jakarta.persistence which is part of JPA 3. JPAStreamer version 1.1.4 is only compatible with JPA 2, but if you update jpastreamer.version to 3.0.3 and rebuild your project you should get a Person$ generated in target/generated-sources. Give it a try and let me know how it goes.

@julgus
Copy link
Member

julgus commented Jul 13, 2023

Also thanks for providing a complete example application - helps a lot!

@julgus julgus added the question Further information is requested label Jul 13, 2023
@julgus julgus added this to In Progress in 3.0.4 Jul 13, 2023
@julgus julgus added this to the 3.0.4 milestone Jul 13, 2023
@Rapter1990
Copy link
Author

@julgus I solved the issue and I forgot to inform you about that. I implemented a config class to handle with that.
Thank you for your answer.

@julgus
Copy link
Member

julgus commented Jul 27, 2023

Great, thanks for the update!

@julgus julgus closed this as completed Jul 27, 2023
@julgus julgus moved this from In Progress to Done in 3.0.4 Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
3.0.4
Done
Development

No branches or pull requests

2 participants