String reference_fields are not matched properly

Sunil Mohan - June 13, 2007 - 09:30
Project:Import / Export API
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

When the key field is string in the parent and a field inside array type child tries to reference it, the match does not happen properly.

All tuples of the child type are listed instead of the just the children matching the parent's reference key. This also happens only when the fields are strings containing digits and no alphabets. I checked the code for the db_get and the way reference fields are compared seems to be the problem. Attached patch correct the problem for me.

http://in2.php.net/manual/en/language.operators.comparison.php#66245

AttachmentSize
01_handle_string_keys.patch1.38 KB
 
 

Drupal is a registered trademark of Dries Buytaert.