Repository Method Generation Issue After Updating to IDEA 2024.2

Answered

Hi, after updating to IDEA 2024.2, I noticed that in the repository method generation window (as shown in the image), the options that were previously selectable in the circled area are no longer available. These features worked perfectly when I was using version 2023.2. Could you please help me understand what might be causing this issue?

0
5 comments

Hi Xx333f,  Can you show a sample JPA Entity code and the step to reproduce the issue? It sounds like a bug in the IDEA's JPA feature.

0

Steps: In the repository code section, right-click, then select Generate -> Repository Method -> Method Find Instance. This basic usage has been working fine in previous versions.

Example:
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;

@Entity
@Table(name="companyid_mapping")
@Data
public class CompanyidMapping implements Serializable {
private static final long serialVersionUID = -9007200083L;

   @Id
   @Column(name = "code") 
   private String code;
   
   @Column(name = "name") 
   private String name;
}
 

0

Hi,

I just want to confirm that you are talking about this feature: https://www.jetbrains.com/help/idea/jpa-buddy-spring-data.html#query-method-generation , if yes, I'll create a bug report for this as I've reproduced it.

0

Yes, I would appreciate it if you could assist in fixing this in future versions. Thank you!

0

Hello,

 

Today, during the bug creation, I tried to capture some screenshots under the latest IDEA 2024.2.1, but it seems it's fixed. I've tried two projects. One is Spring Petclinic:

https://github.com/spring-projects/spring-petclinic/blob/main/src/main/java/org/springframework/samples/petclinic/vet/VetRepository.java 

Please try if it works for you, too. If not, Please provide a minimal sample project so I can reproduce the issue without including your sensitive code. Thank you! Please upload it to https://uploads.jetbrains.com/  and paste the upload id here.

 

0

Please sign in to leave a comment.