问题
I have a criteria that is roughly like this :
public class DocuSignTemplateDefinitionCriteria implements Serializable {
public static class DocuSignTemplateTypeFilter extends Filter<DocuSignTemplateType> {
}
private DocuSignTemplateTypeFilter templateType;
private LongFilter sponsorLevelId;
private LongFilter languageId;
private LongFilter eventId;
From the TypeScript service, I can use the query with all the simple types (in this example, longs):
this.http.get(`${this.resourceUrl}languageId.equals=2&sponsorLevelId.equals=4&eventId.equals=1001`)
But I can't figure out how to query the enum DocuSignTemplateType
. I've used several syntaxes (below is one example), but I can't get it right.
this.http.get(`${this.resourceUrl}?languageId.equals=2&sponsorLevelId.equals=4&eventId.equals=1001&templateType.equals=DocuSignTemplateType.SPONSOR_AGREEMENT`)
Any idea ? Any example on how to archieve this ?
Thanks
回答1:
As said in comment, it must be templateType.equals=SPONSOR_AGREEMENT
without the enum class name.
来源:https://stackoverflow.com/questions/47111866/how-to-use-criteria-with-enums-from-typescript-service