SDG Datasource DB_Dataobject

From: Date: Mon, 25 Feb 2008 07:39:51 +0000
Subject: SDG Datasource DB_Dataobject
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28569@lists.php.net to get a copy of this message
Hi I'm using Structures_Datagrid to display some data, using the DB_DataObject-datasource. However, there is one thing which puzzles me. I have in my database some columns with underscores in their names: dansk_navn, latinsk_navn If I then have a getter in my DataObject called getDansk_navn(), it is _not_ called by the datasource when getting data. But if I call it getDanskNavn(), it gets called to fetch the data of dansk_navn. Looking in the source of the DB_DataObject-datasource, it seems intentional that it will strip of any _ when using getters. If no getter is present, it will still get the correct data of the dansk_navn-property. Why is it like this? is it a bug? -- Mads Lie Jensen - mads@gartneriet.dk - ICQ #25478403 Gartneriet - http://www.gartneriet.dk/

« previous php.pear.general (#28569) next »