rsql-jpa-specification
rsql-jpa-specification copied to clipboard
Why does it not work while using the nn, nutnull or isnotnull?
My rsql is like this:
status=='ACTIVE';region!='';filespacePrefix!='';workflowExtInfo=nn=
but workflowExtInfo=nn= does not work, and the param workflowExtInfo is a map.
And I use the postgresql.
Hi @alansun2, could you share your model class? Thanks.
helloe @perplexhub My model like this: DriveCluster:
@Entity
@Table(name = "drive_cluster", schema = "drive")
@SQLDelete(sql = "UPDATE drive.drive_cluster SET deleted = TRUE WHERE id = ?")
@SQLRestriction(value = "deleted = false")
public class DriveCluster extends DomainObject implements Serializable {
private String studio;
private String studioId;
private String name;
@Type(JsonType.class)
@Column(name = "cities", columnDefinition = "jsonb")
private List<Object> cities;
private String vendor;
@Size(max = 255)
@NotNull
@Column(name = "user_group_prefix", nullable = false)
private String userGroupPrefix;
@Enumerated(value = EnumType.STRING)
@Column(name = "status", nullable = false)
private ClusterStatusEnum status = ClusterStatusEnum.DETACHED;
@Size(max = 255)
@Column(name = "region")
private String region;
@Column(name = "workflow_ext_info")
@JdbcTypeCode(SqlTypes.JSON)
private Map<String, Object> workflowExtInfo;
@Size(max = 32)
@Column(name = "filespace_prefix")
private String filespacePrefix;
ClusterStatusEnum:
public enum ClusterStatusEnum {
ACTIVE, IN_PROVISION, ERROR, DETACHED
}
@perplexhub hello
Hello,
It's a problem in the version 5.x that is resolved in the version 6.x
The parser expects a value after the =nn= operator.
To solve the problem, you can simply add an empty value like this workflowExtInfo=nn=''.
I hope I was able to help you.
Regards