Closed (duplicate)
Project:
MongoDB
Version:
7.x-1.x-dev
Component:
Field storage
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Jul 2012 at 18:21 UTC
Updated:
17 Aug 2012 at 22:05 UTC
#1054162: Taxonomy bundles not supported by EntityFieldQuery (followup) amended how efq queries for taxonomy are generated, there however is an issue when using say mongodb for field storage as the vid is not being cast to an integer and as a result the query no longer works because mongo expects an integer not a string.
Patch attached to fix up this issue
| Comment | File | Size | Author |
|---|---|---|---|
| cast-vid.patch | 893 bytes | marcingy |
Comments
Comment #1
sunThis seems to impact alternative storage controllers only, so I don't see how we could test it. Thus, RTBC.
Comment #2
chx commentedI know for sure that MySQL can't use the index on a varchar column when comparing to an int. So says the manual: For comparisons of a string column with a number, MySQL cannot use an index on the column to look up the value quickly. I do not know whether the optimizer has the brains to optimize out the comparisons of a number column with a string, in this case to cast vid only once.
I am somewhat curious why vid is not int in the first place but that's a followup as both pgsql and sqlite has PDO::ATTR_STRINGIFY_FETCHES => TRUE, so that's quite deliberate.
Comment #3
marcingy commentedMoving to mongodb project after IRC chat with chx.
Comment #4
marcingy commentedComment #5
marcingy commentedComment #6
chx commentedComment #7
chx commentedComment #8
marcingy commentedDuplicate of #1737238: MongoDB storage query doesn't cast.
Comment #8.0
marcingy commentedCorrecting typo