Skip to content

Commit

Permalink
added an entity with compound ids to TestApp0 to reproduce the proble…
Browse files Browse the repository at this point in the history
…m described in TAP5-2783
  • Loading branch information
HendrikNXS committed Jul 9, 2024
1 parent e0345b6 commit 2635be9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.example.app0.entities;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

/**
* This class is an example for an entity that uses a compound id. This triggers a bug with tapestry <= 5.8.6 during
* initialisation, see TAP-123.
*/
@IdClass(CompoundIdEntityPK.class)
@Entity
public class CompoundIdEntity {
@Id private Long firstId;
@Id private Long secondId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.example.app0.entities;

import java.io.Serializable;

public class CompoundIdEntityPK implements Serializable {
private Long firstId;
private Long secondId;

public CompoundIdEntityPK(Long firstId, Long secondId) {
this.firstId = firstId;
this.secondId = secondId;
}
}

0 comments on commit 2635be9

Please sign in to comment.