假设我有一个具有多值属性(例如数字)的 Datomic 实体。我将如何返回其值不包含特定数字的实体列表?
举个例子,
{:db/id #db/id [:db.part/db]
:db/ident :strs
:db/valueType :db.type/string
:db/cardinality :db.cardinality/many
db.install/_attribute :db.part/db
}
我想找到列表中不包含数字 1 的所有实体。
If I do something like:
[:find ?e :where
[?e :strs ?v]
(not [(.contains ?v "b")])
]
但是我有
e1 :strs ["a", "b", "c"]
e2 :strs ["a", "b"]
e3 :strs ["h", "i", "j"]
然后返回所有实体,因为查询被解释为“查找具有不包含“b”的strs成员的实体”,但我需要
"找到每个成员不包含 "b" 的实体 e"。
谢谢!