Using views with Quarkus / panache is today a bit tricky.
With version 3 this aint working anymore.
I used to
create an entity bound to a table that in reality is a view
create a migration script that delete the table and create my view
With Quarkus 3 this aint working anymore.
So now I found another solution with using @SubSelect.
Implementation ideas
Maybe we could have something similar as Spring boot
@Entity
@Immutable
@Table(name= "myview")
public class ChessGameView {
@Id
private Long id;
private int gameRound;
private String tournamentName;
public Long getId() {
return id;
}
public int getGameRound() {
return gameRound;
}
public String getTournamentName() {
return tournamentName;
}
}
Or something way easyer
@EntityView(name= "my_view")
public class ChessGameView {
@Id
private Long id;
private int gameRound;
private String tournamentName;
public Long getId() {
return id;
}
public int getGameRound() {
return gameRound;
}
public String getTournamentName() {
return tournamentName;
}
}
Maybe there's some other better choice of handling this with quarkus but there is nothing about it.
Could be helpful to add something about this in the panache wiki.
(Good job about this Quarkus 3 release, really loving all that new stuff)
Description
Using views with Quarkus / panache is today a bit tricky. With version 3 this aint working anymore. I used to
With Quarkus 3 this aint working anymore.
So now I found another solution with using
@SubSelect
.Implementation ideas
Maybe we could have something similar as Spring boot
Or something way easyer
Maybe there's some other better choice of handling this with quarkus but there is nothing about it. Could be helpful to add something about this in the panache wiki.
(Good job about this Quarkus 3 release, really loving all that new stuff)