I have in my database a column that called "info" from a type of jsonb that looks like this:
info={'duration','metrics'}
I want to use a hql query to get the data of 'duration'
this is the query I'm trying to do:
@Query(value = "select new com.hyginex.service.statistic.dto.NewWristbandRecordByUser(wrp.user.id, wrp.recordTimestamp, wrp.id, wrp.device.id, wrp.rssi, wrp.beacon.id, wrp.beacon.locatableType) " +
"from WristbandRecordProcessed wrp where wrp.user.id = :userId and wrp.rssi is null and wrp.recordTimestamp > :lastTimestamp and wrp.recordType = 'HANDWASH' and (wrp.info->'duration')*(wrp.avgCrossing)>100 order by wrp.recordTimestamp ")
but I'm getting error when i do:
(wrp.info->'duration')
i tried even without the ' ' and still didn't work.