The end of the HQL looks something like this:
SELET DISTINCT e FROM entity
WHERE ...
... AND
'type' in indices(e.attributes)
'attributes ' is the collection of attributes.
I would have guessed this to work, but no. I eventually tried this in plain SQL, where it of course also does not work.
I also tried with this, for the other way around (exclusion):
SELET DISTINCT e FROM entity
WHERE ...
... AND
e.attributes['type'] != 'animation'
I can sort of understand this last construct being wrong. The correct way to do things is apparently to swap these two, basically use "not in" for exclusion and use "join" to include things, which is what
e.attributes['type'] = 'animation'
uses.
No comments:
Post a Comment