Re: DB_DataObject_FormBuilder

From: Date: Wed, 03 Mar 2004 01:47:11 +0000
Subject: Re: DB_DataObject_FormBuilder
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11065@lists.php.net to get a copy of this message
Hello David, Thank you very much for your long description. This is a known bug and we are working on it. The reason for this behaviour is that a new version of DB_DataObject came out which handles NOT NULL fields also. If a field is a NOT NULL field, it's value in the .ini file you've mentioned will be increased by 128 and there are some other changes also. This bug has been filed in bug report #624 and reported again in #919. http://pear.php.net/bugs/bug.php?id=624 http://pear.php.net/bugs/bug.php?id=919 (please don't fill any new bug report with this bug.) I'm sure Markus will take a look at it as soon as he gets the time. Markus, this bug seems to cause real troubles for many users. Please tell me if I can help you fixing it. I have a cvs account for peardoc, I don't know if it can be used for updating FormBuilder.php. I think a new release is also needed because people waste their time with the last one just like David did. I made some new FormBuilder improvements, they'll follow up soon.. Regards, Norbert David Thunman wrote:
I have been experiementing with DB_Object_FormBuilder because I wanted to take advantage of the automatic form building based on table structure, and to explore the feature of related tables (Where one tables primary key is a related key in another table) where the form builder creates dropdown menus to the related tables. At first this did not work at all, then I downloaded the example from the CVS and looked into the forbuilder.ini file and found out that the values did not match the ones i had i my ini file. The example way is that each collumn not being an id collumn have the value one, all the others the value two. In my file (created by the createTable.php and my db_object.ini file), the valuse where something entirely different. for example the tablename_keys properties always had a value "N" Anyhow, after changing my tablename.ini to only containing the numbers 1 and 2, the dropdown function started to work. Worth mentioning is that i also copied the schema.sql from the CVS and imitated this style of creating tables. Does anyone know whether this: CONSTRAINT PK_company PRIMARY KEY (company_id),
    UNIQUE KEY IDX_company_1(company_id)
is required and what it does... I attach my schema.sql, tablename.ini and tablename.links.ini below so you better see my structure. David Thunman /***** * schema.sql ********/ CREATE TABLE person (
    person_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
    company_ID INTEGER UNSIGNED NOT NULL,
    firstname VARCHAR(96) NOT NULL,
    lastname VARCHAR(96) NOT NULL,
    email VARCHAR(96) NOT NULL,
    info TEXT,
    CONSTRAINT PK_person PRIMARY KEY (person_id),
    KEY IDX_person_1(company_ID)
); CREATE TABLE company (
    company_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
    name VARCHAR(255) NOT NULL,
    street VARCHAR(255) NOT NULL,
    zip VARCHAR(255) NOT NULL,
    city VARCHAR(255) NOT NULL,
    country VARCHAR(255) NOT NULL,
    CONSTRAINT PK_company PRIMARY KEY (company_id),
    UNIQUE KEY IDX_company_1(company_id)
); /***** * tablename.ini ********/ [company] company_id = 1 name = 2 street = 2 zip = 2 city = 2 country = 2 [company__keys] company_id = 1 [person] person_id = 1 company_ID = 1 firstname = 2 lastname = 2 email = 2 info = 2 [person__keys] person_id = 1 /***** * tablename.links.ini ********/ ; This file defines relations between your tables. This is needed for ; automatic combobox building, auto-joins and more. Always keep it up-to-date. ; Format is pretty straightforward: ; [tablename] ; fieldname = targetTableName:targetFieldName [person] company_ID = company:company_id


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