I am trying to use PANACHE for filtering my search and also paging it.
I have create an enity class, which is identical to my table in the database
@Entity
data class LOGGING(
@Id
var GUUID: String? = null,
var TS: String? = null,
var MSG_ID: String? = null,
var MSG_TYPE: String? = null,
var AKTOR: String? = null,
var SYSTEM: String? = null,
var ERROR_V: String? = null,
var ERROR_DN: String? = null,
var MSG: String? = null,
var DIALOG_ID: String? = null,
var REASON: String? = null,
var FILENAME: String? = null,
var APPREC_STATUS: Integer? = null,
var HER_ID: String? = null,
) : PanacheEntity() {
}
This is my repo
@ApplicationScoped
class LoggingRepo: PanacheRepository<LOGGING> {
fun getParam(
queryString: String,
paramsMap: Map<String, Any>,
page: Int,
pageSize: Int,
): List<LOGGING> {
//Here I get a red mark on find saying None of the following functions can be called with the arguments supplied
// I have tried using Parameters but I get the same result
val panacheQuery = find<LOGGING>(queryString, paramsMap)
// Fetch results and pagination handling
return panacheQuery.page(Page.of(page, pageSize)).list<LOGGING>()
}
}
The problem I am facing is in find which returns that none of the following function can be called. When i remove and just use find() it passes, but then I get an error here
panacheQuery.page(Page.of(page, pageSize)).list<LOGGING>()
.page return “Not enough information to infer type variable T”
I have no Idea what is wrong and I have tried many different ways. Any help would be greatly appreciated