"Doesn't seem to make much sense as an element of consistency has been lost
here."

Hmm. Good point.

-----Original Message-----
From: Jon [mailto:[EMAIL PROTECTED] 
Sent: March 19, 2007 10:53 AM
To: fw-general@lists.zend.com
Subject: RE: [fw-general] Zend_Db_Table_Row __get()

I don't understand why the camel case conversion has been dropped? 

As far as I can see all variables (in ZF) are camelCased, even the PDF
document "Best Practices of PHP Development" written by Zend states that all
variables should be camelCased. So why change it for Zend_Db? Doesn't seem
to make much sense as an element of consistency has been lost here.

-----Original Message-----
From: Art Hundiak [mailto:[EMAIL PROTECTED] 
Sent: 19 March 2007 16:42
To: fw-general@lists.zend.com
Subject: RE: [fw-general] Zend_Db_Table_Row __get()

Basic problem is that the pdo adapter has:
            // force names to lower case
            $this->_connection->setAttribute(PDO::ATTR_CASE,
PDO::CASE_LOWER);

You will have to figure out how to change it to CASE_NATURAL.  Even then I
suspect you might have trouble with case sensitivity.

I myself rather liked the camel case conversion.  It being dropped is one
of the reasons I gave up on Zend_Db.

>
> It appears that all column preparation has been removed on each row.
>
> 0.8 Usage:
>
> CREATE TABLE `accounts` (
>   `id` int(11) NOT NULL auto_increment,
>   `date_entered` datetime default NULL,
>   `date_modified` datetime default NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=InnoDB;
>
> foreach($this->account as $account)
> {
>       echo $account->dateModified;
> }
>
> Current 0.9 Usage: (untested)
>
> foreach($this->account as $account)
> {
>       echo $account->date_modified;
> }
>
> I never liked the camel-casing. I found it confusing. I like the 0.9 usage
> better because I know exactly what to expect. The camel-casing limited
> system predictability. (This can of course be argued both ways).
>
> Bug? Feature?
>
> -----Original Message-----
> From: Aaron Egaas [mailto:[EMAIL PROTECTED]
> Sent: March 19, 2007 10:26 AM
> To: fw-general@lists.zend.com
> Subject: [fw-general] Zend_Db_Table_Row __get()
>
>
> Hello,
>
> Prior to 0.9, I was using underscored field names in my MySQL database and
> relying on Zend_Db's inflector to produce nice Camel-cased field names
> within the Zend framework. Since 0.9 with the inflector gone, I switched
> my
> field name in the database to camel case so I didn't have to refactor a
> lot
> of code. Unforunately I think I found a bug when I did this.
>
> All over my app I get exceptions saying the field (jobId for example)
> isn't
> found! I dumped out the Db_Row and all the fieldnames have been lower
> cased.
>
> I'm using MySQL's PDO. Anyone know whats causing my plight?
>
> -Aaron Egaas
>
>
> --
> View this message in context:
>
http://www.nabble.com/Zend_Db_Table_Row-__get%28%29-tf3428196s16154.html#a95
> 55537
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>
>




Reply via email to