-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added an entity with compound ids to TestApp0 to reproduce the proble…
…m described in TAP5-2783
- Loading branch information
1 parent
e0345b6
commit 2635be9
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
tapestry-hibernate/src/test/java/org/example/app0/entities/CompoundIdEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
13 changes: 13 additions & 0 deletions
13
tapestry-hibernate/src/test/java/org/example/app0/entities/CompoundIdEntityPK.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |