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

JPA Repo Entity ID composite key reports problem #1220

Closed
BoykoAlex opened this issue Apr 3, 2024 · 1 comment
Closed

JPA Repo Entity ID composite key reports problem #1220

BoykoAlex opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: validation type: bug

Comments

@BoykoAlex
Copy link
Contributor

BoykoAlex commented Apr 3, 2024

image

Spring Tool Suite 4 
Version: 4.22.0.RELEASE
Build Id: 202403071427
Revision: 44291b464093d161f115d8e16059e5272ed3c81d
import jakarta.persistence.Column;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

@Setter
@Getter
@EqualsAndHashCode
@MappedSuperclass
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public abstract class BaseEntity {

  @Id
  @Column(name = "id")
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;
}
import org.springframework.data.jpa.repository.support.JpaEntityInformation;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;

import jakarta.persistence.EntityManager;

public abstract class RdsJpaRepository<T extends BaseEntity, ID>
    extends SimpleJpaRepository<T, ID> {

  public RdsJpaRepository(Class<T> domainClass, EntityManager em) {
    super(domainClass, em);
  }

  public RdsJpaRepository(
      JpaEntityInformation<T, ?> entityInformation, EntityManager entityManager) {
    super(entityInformation, entityManager);
  }
}

(cc: @WeiMao33)

@BoykoAlex
Copy link
Contributor Author

Should be fixed with: 131336a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: validation type: bug
Projects
None yet
Development

No branches or pull requests

2 participants