Skip to content

Commit

Permalink
Work around HHH-18285 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Jun 25, 2024
1 parent 3a19c30 commit ede4448
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ public void setEmbeddableMapValueWithAnnotation(
}

@Embeddable
@MappedSuperclass
public static class EmbeddableWithAnnotation {
private String text;

Expand Down Expand Up @@ -283,8 +282,29 @@ public void setEmbedded(EmbeddableWithAnnotation embedded) {
}
}

@MappedSuperclass
public static abstract class MappedSuperclassForEmbeddable {
private String text;

protected MappedSuperclassForEmbeddable() {
// For Hibernate ORM only - it will change the property value through reflection
}

public MappedSuperclassForEmbeddable(String text) {
this.text = text;
}

public String getText() {
return text;
}

public void setText(String text) {
this.text = text;
}
}

@Embeddable
public static class ExtendedEmbeddableWithAnnotation extends EmbeddableWithAnnotation {
public static class ExtendedEmbeddableWithAnnotation extends MappedSuperclassForEmbeddable {
private Integer integer;

protected ExtendedEmbeddableWithAnnotation() {
Expand Down

0 comments on commit ede4448

Please sign in to comment.