Posted by marcingy on July 31, 2012 at 6:21pm
5 followers
Jump to:
| Project: | Mongodb |
| Version: | 7.x-1.x-dev |
| Component: | Field storage |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | Entity system |
Issue Summary
#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
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| cast-vid.patch | 893 bytes | Idle | PASSED: [[SimpleTest]]: [MySQL] 39,746 pass(es). | View details | Re-test |
Comments
#1
This seems to impact alternative storage controllers only, so I don't see how we could test it. Thus, RTBC.
#2
I 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.
#3
Moving to mongodb project after IRC chat with chx.
#4
#5
#6
#7
#8
Duplicate of #1737238: MongoDB storage query doesn't cast.