Re: DB_DataObject_FormBuilder and crossLinkExtraFields
| From: | James Stewart | Date: | Sat, 23 Sep 2006 14:24:31 +0000 |
| Subject: | Re: DB_DataObject_FormBuilder and crossLinkExtraFields | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25221@lists.php.net to get a copy of this message | ||
On Sep 23, 2006, at 2:53 AM, Justin Patrin wrote:
On 9/22/06, James Stewart <lists@jystewart.net> wrote:Creating a DO for just the conference_session_time_slot table and then calling print DB_DataObject_FormBuilder::_getPrimaryKey($do); returns 'id' as expected, and generating and using a form for just that table works too. It seems to be just when it's used as a crossLink/extraField that I run into problems. James.It was auto-generated, and the keys entry is as shown.Well, line 3006 of FormBuilder.php calls processForm on a sub-FB instance for the crossLink-ed record so the normal FB algorithm is used for insert vs. update. Try creating a DO manually for a record in that table then calling $pk = DB_DataObject_FormBuilder::_getPrimaryKey($do) and seeing what's in $pk. If this shows the expected output ("id") then try manually creating an FB and setting it up to edit the record (note: pearified/DB_DataObject_FormBuilder_Frontend can be used to browse/edit all data in any DOs :-).