~~ (not identical) is an
inlined selector. So it's not being passed to Glorp, it's being directly
run as part of the block. That makes the query block overall evaluate
to false, so you're getting exactly the same effect as if you wrote
newQuery AND: [:each | false]
This is the same reason you have to write AND: (or &) instead of
and:
Good morning,
I was wondering why the code below does not give the
same results ?
myColl := (self
getGlorpSession readManyOf: Attachement
where: [:each | each hashvalue = eachAtt hashvalue])
select: [:each | each id ~~ eachAtt id].
newQuery := Glorp.Query
readManyOf: Attachement
where: [:each | each hashvalue = eachAtt hashvalue].
newQuery := newQuery AND: [:each | each id ~~ eachAtt id].
aColl := self getGlorpSession execute: newQuery.
Thanks,
@+Maarten,
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc