On Mon, 9 Mar 2009, Peter Hopfgartner wrote: > Tobias Schlitt wrote: > > > > On 03/04/2009 04:06 PM Peter Hopfgartner wrote: > > > > > >> When trying to $session->load(), the whole thing blows up in > >> ezc/PersistentObject/internal/state_transformer.php, line 57. Trying to > >> diagnose what happens I would guess that the database $row in the > >> function parameters has the keys turned to lower case because of the PDO > >> settings in Database/handler.php, line 91: $this->setAttribute( > >> PDO::ATTR_CASE, PDO::CASE_LOWER ), as should a print_r($row) in the > >> function body: > >> > > > > I actually have no clue why this is set in the database handler. Maybe > > someone else knows (@ team members)? > > > > If not, I'd definitily consider it as a bug. > > > > Thanks a lot for the hint. I think we have no test case that checks for > > upper case column names in PersistentObject, so we did not detect it > > earlier. > > Just another 2 c. > > Personally, I like to have database identifiers in the default case of > the database, e.g. lower case on PostgreSQL and upper case in Oracle. > > If I would like to use the same PHP code for both data bases, I would > have, as by now, to omit the quoteIdentifier () method when constructing > my queries. > > Do you think it would be useful to have an set the options "use db > identifier case" and "set db identifier case" in the database instance? > This way the database components would have all informations they need > to handle case automatically, e.g. quoteIdenifier() could > strtoupper/strtolower as needed.
I think that'd be good to have. Now if all RDBMses just implemented the SQL standard... (which says identifiers should be uppercase btw) regards, -- Derick Rethans eZ components Product Manager eZ systems | http://ez.no -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components