Re: DB_DataObject_FormBuilder and crossLinkExtraFields
| From: | Justin Patrin | Date: | Sun, 24 Sep 2006 00:00:20 +0000 |
| Subject: | Re: DB_DataObject_FormBuilder and crossLinkExtraFields | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-25223@lists.php.net to get a copy of this message | ||
On 9/23/06, James Stewart <lists@jystewart.net> wrote:
On Sep 23, 2006, at 2:53 AM, Justin Patrin wrote: On 9/22/06, James Stewart <lists@jystewart.net> wrote:Sorry, I'm not sure what it could be. Are you using the newest version of FormBuilder? If you are, I suggest going into the FormBuilder code and trying to figure out what happens. Try looking around line 2824 of FormBuilder.php and see what is in $this->_do, what $this->_queryType is set to, and what $action gets set to. -- Justin PatrinWell, 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 :-). 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.It was auto-generated, and the keys entry is as shown.