You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method readCollectionOrArray creates a collection, although if there are no keys it returns null, which seems kinda strange. Wouldn't it be more client-friendly to return an empty list?
For example:
@RedisHash("Entity")
public class Entity {
@Id
private long id;
@Indexed
private List<String> props;
}
props will be null on query if it was saved as an empty list
The text was updated successfully, but these errors were encountered:
Will this ever be fixed? Because of this issue Kotlin data-classes are looking funky if they have possibly empty collection attribute, example:
@RedisHash("access_tokens")
data classAccessToken(
@Id valid:String,
valprincipalName:String,
valauthorizedRoles:Set<String>, // <- deserialization results an error if set is empty
)
This issue requires to write something like this:
@RedisHash("access_tokens")
data classAccessToken(
@Id valid:String,
valprincipalName:String,
privateval_authorizedRoles:Set<String>?,
) {
val authorizedRoles:Set<String> get() =_authorizedRoles?:setOf()
}
Method readCollectionOrArray creates a collection, although if there are no keys it returns null, which seems kinda strange. Wouldn't it be more client-friendly to return an empty list?
For example:
props will be null on query if it was saved as an empty list
The text was updated successfully, but these errors were encountered: