Hi we are currently starting with the migration to Quarkus 3, We face some issues with our existing database structure and Hibernate 6. It seems to be the combination of a composite key and a fetch join. Due to the changes I checked the documentation and migration guide again in case we did something wrong or forgot something. I do not see it 😞 . I created a reproducer here: https://github.com/holomekc/quarkus-quickstarts/tree/main/hibernate-reactive-panache-quickstart But maybe here in short as well:
@Entity
@Table(name = "fruit_basket")
public class FruitBasket extends PanacheEntity {
@Column
public String name;
@OneToMany(mappedBy = "basket", fetch = FetchType.LAZY)
public Collection<Fruit> fruits;
}
@Entity
@IdClass(FruitId.class)
@Table(name = "fruit")
public class Fruit extends PanacheEntityBase {
@Id
@GeneratedValue
public Long id;
@Id
@JoinColumn(name = "basket_id", referencedColumnName = "id", foreignKey = @ForeignKey(name = "basket_fk"))
@ManyToOne(fetch = FetchType.LAZY)
public FruitBasket basket;
@Column(length = 40, unique = true)
public String name;
public Fruit() {
}
public Fruit(String name) {
this.name = name;
}
}
Br, Chris |