PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject_FormBuilder » Bug #2888

Automatically add null element in Select for Link if field may be null

Details

Request #2888Automatically add null element in Select for Link if field may be null
Submitted2004-12-04 15:43 UTC
Fromc dot schneider at scram dot de
Assignedjustinpatrin
StatusClosed
PackageDB_DataObject_FormBuilder
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2004-12-04 15:43 UTC] c dot schneider at scram dot de

Description:
------------
If I have two tables:

person
id
car_id (may be null in database)

car
id
name

and a link in db_name.links.ini

[person]
car_id = car:id

Inside a person form I get a select for car. As the database allows this field to be null. The select should also contain a null element. Is this possible?

[2004-12-05 00:17 UTC] c dot schneider at scram dot de

I already use this option to work around the problem. But selectAddEmpty does not add a NULL to the row. In my case the field is an int and should contain NULL if no link is selected but FormBuilder sets the field to 0. Is this a bug?

[2004-12-08 01:36 UTC] c dot schneider at scram dot de

I have just installed the cvs version and can confirm it works in my test example. Many thanks for the fast fix.