snap-admin icon indicating copy to clipboard operation
snap-admin copied to clipboard

Support for composite key

Open daaa57150 opened this issue 9 months ago • 0 comments

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;

    // ...
}

daaa57150 avatar May 21 '24 09:05 daaa57150