Get document with findById method in couchbase-data with generic type


#1

Hi, I want to retrieve this json document that is stored in couchbase using couchbase data with SpringBoot.
{
“alerts”: [
{
“associatedAccountId”: “59395000”,
“associatedCardId”: “34618000”,
“categoryId”: “0018”,
“max”: 200,
“min”: 5,
“uuid”: “108998_0018”
},
{
“associatedAccountId”: “59395000”,
“associatedCardId”: “34618000”,
“categoryId”: “0015”,
“max”: 500,
“min”: 5,
“uuid”: “108998_0015”
}
]
}
I tried to use the findById method by I cannot pass a List so how would it be? With couchbase-client I can get to work it by using bucket.get() and then transform the raw json document to my entity using alertCollectionType = new TypeToken<List<Alert>>(){}.getType();