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

Support for composite key #46

Open
daaa57150 opened this issue May 21, 2024 · 0 comments
Open

Support for composite key #46

daaa57150 opened this issue May 21, 2024 · 0 comments

Comments

@daaa57150
Copy link

Hi,

I was testing your library but stumbled on a problem with one of our entities because it has a composite key.

Is there a plan to support that ?

Here is the relevant code we have:

// File: UserLanguageJPA.class
@Entity
@IdClass(UserLanguageId.class)
@Table(name = "user_language", schema = "public")
public class UserLanguageJPA {
    @OneToOne
    @JoinColumn(name = "user_id")
    @Id
    private UserJPA user;

    @ManyToOne
    @Id
    @JoinColumn(name="language_code")
    private LanguageJPA language;

    // ...
}
// File: UserLanguageId.class
public class UserLanguageId implements Serializable {
    private UserJPA user;
    private LanguageJPA language;

    // ...
}
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

1 participant