没有确切元数据字段的组件的Tridion查询
我有一个基于模式的组件,它有一个非强制性的元数据字段ExtendedType。我可以查询具有此字段且具有特定值的组件:没有确切元数据字段的组件的Tridion查询,tridion,tridion-content-delivery,Tridion,Tridion Content Delivery,我有一个基于模式的组件,它有一个非强制性的元数据字段ExtendedType。我可以查询具有此字段且具有特定值的组件: new CustomMetaValueCriteria(new CustomMetaKeyCriteria("ExtendedType"), "Highlight", Criteria.Equal))) 我需要查询没有填写此字段的组件。我怎样才能查询一个这样的问题 在SQL中,我可以编写下一个: select * from t where t.ExtendedType IS
new CustomMetaValueCriteria(new CustomMetaKeyCriteria("ExtendedType"), "Highlight", Criteria.Equal)))
我需要查询没有填写此字段的组件。我怎样才能查询一个这样的问题
在SQL中,我可以编写下一个:
select * from t where t.ExtendedType IS NULL
如何使用Trdion查询来实现这一点?通常,我需要实现如下查询:
select * from t where t.ExtendedType = "Highlight" OR t.ExtendedType IS NULL
您可以通过NotInCriteria实现这一点,如下所示:
new NotInCriteria
(
new CustomMetaValueCriteria
(
new CustomMetaKeyCriteria("ExtendedType"), "%", Criteria.Like
)
)
我还没有测试过,这只是一个想法。即使它能工作,一定要检查它是否也能正常工作
PS:下次,请使用tridion.stackexchange.com论坛了解与tridion相关的问题您可能想考虑使用Trdion专用堆栈交换站点来解决未来的SDL三叉问题。