Re: DB_DataObject, part 2
| From: | Justin Patrin | Date: | Fri, 22 Sep 2006 00:38:10 +0000 |
| Subject: | Re: DB_DataObject, part 2 | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25198@lists.php.net to get a copy of this message | ||
On 9/21/06, Chris Boget <chris.boget@wild.net> wrote:
Why is fetch() putting the values of the columns in member variables that do not match the original case of the field? Here is the structure of my object after it's instantiated and find() is called: $feedback; Feedback Object (Perhaps a portability option is being set in the DB connection? -- Justin Patrin[__table] => Feedback [id] => [responseTo] => [fromUid] => [toUid] => [rating] => [comments] => [dateSubmitted] => [_DB_DataObject_version] => 1.8.4 [N] => 349 [_database_dsn] => [_database_dsn_md5] => 'blah' [_database] => communal_haven [_query] => Array ( [condition] => [group_by] => [order_by] => [having] => [limit_start] => [limit_count] => [data_select] => * )[_DB_resultid] => 1 [_resultFields] => [_link_loaded] => [_join] => [_lastError] =>) Here is the structure of my object after fetch (first row) $feedback; Feedback Object ([__table] => Feedback [id] => 1 [responseTo] => [fromUid] => [toUid] => [rating] => 1 [comments] => My Comment [dateSubmitted] => [_DB_DataObject_version] => 1.8.4 [N] => 349 [_database_dsn] => [_database_dsn_md5] => 'blah' [_database] => communal_haven [_DB_resultid] => 1 [_resultFields] => [_link_loaded] => [_join] => [_lastError] => [responseto] => 0 [fromuid] => nosferatustuff [touid] => oaflord [datesubmitted] => 2001-04-18 06:28:14) notice the 4 new columns that do not match the case of the actual columns. And they are the ones that hold the value! :( What's the rationale for this? I see where this is happening in the fetch() method but I don't understand why it's happening. Shouldn't it keep the original case? This is going to make inserting and updating rows impossible unless I override both of those methods. Am I missing something here? I feel like I must be...