Re: DD_DataObject and views in Firebird

From: Date: Fri, 22 Sep 2006 06:56:28 +0000
Subject: Re: DD_DataObject and views in Firebird
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25210@lists.php.net to get a copy of this message
Il 08:42, venerdì 22 settembre 2006, Justin Patrin ha scritto: > On 9/21/06, Alessandro Pasotti <ale.pas@tiscali.it> wrote: > > Hello, > > > > maybe this is a really silly question... but unfortunately I'm not a DB > > expert. > > > > I'm successfully using DBDAO for a large project based on firebird DB > > (many thanks to all this list for the help and advice given in the last > > year), now they added some views that should be mapped (read only) to a > > DB_DataObject, do you think is it possible? > > > > Should I build the class by hand? > > Any hint/hack/advice or something I should take in account before start > > coding? > > I believe that there's an option to create DOs for views. You were right: build_views boolean Postgres (and maybe some others), allow you to treat views just like normal tables (eg. insert/update/delete etc. work on them), you can use this option to generate files for all the views in the database. Note: You will have to specify keys manually in the generated classes (eg. define the methods keys() and sequenceKey(), as the generator can not guess which ones are likely to be the key. http://pear.php.net/manual/en/package.database.db-dataobject.intro-configuration.php I should have searched the manual first, sorry :( I will check if this works also on Firebird. Thanks. -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502

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