Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在最新版本之一之前,我可以使用如下谓词:
(myEntity.myEnum, '<', 100) -
这不再有效,因为枚举被视为字符串
那么我们如何过滤枚举呢?
您使用枚举值的“名称”。例如
在服务器上:
public enum RoleType { Guest = 0, Restricted = 1, Standard = 2, Admin = 3
}
查询:
var query = new EntityQuery("Roles").where("roleType", "==", 'Restricted');