[TYPO3-dev] Fields in the TCA that does not exist in the DB
Malte Jansen
mail at maltejansen.de
Fri Oct 26 11:05:42 CEST 2007
Perhaps there should be a check for the DB if the field exists. If the
field does not exists, there should be an warning/error-message-box like
the "ENABLE_INSTALL_TOOL" on the module-page. Perhaps this box code be
used for messages from hooks too, which have some special checks.
But the box would be another feature. You could use is for
db-error-messages and the dataset is open again, so you could check the
field-value again. You could have have 2 levels: warning (yellow), error
(red).
But back to the topic.
The default value should be false. Because it the standard for all
existing extensions. So you know if the db-field is wanted. You could
use $TYPO3_DB->admin_get_fields(tablename) for checking (perhaps in the
EM instead of "some fields are missing") it, but sometimes you update
modify a extension and you forget to add the field to sql-field. So you
don't know I it is a real noDB field. So there should be a parameter,
because developing new extension would be much easier...
Short:
So "noDB = true" wouldn't make request to the db and would unset the
value before saving.
If you would check every field with
$TYPO3_DB->admin_get_fields(tablename) wheather it exists or not, it
costs much more time (and resources?).
Malte
Steffen Kamper schrieb:
> "Mads Brunn" <mads at typoconsult.dk> schrieb im Newsbeitrag
> news:mailman.1.1193315459.18630.typo3-dev at lists.netfielders.de...
>> Steffen Kamper skrev:
>>> "Malte Jansen" <mail at maltejansen.de> schrieb im Newsbeitrag
>>> news:mailman.1.1193309052.9474.typo3-dev at lists.netfielders.de...
>>>> I have written something in the "Thread" but I think it got lost...
>>>> Steffen I think it corresponde with your idea
>>>>
>>>>
>>>> What about a key in the config of $tca-field like
>>>> config => array(
>>>> "noDB" => true/false;
>>>> )
>>>>
>>
>> But create yet another TCA-setting when we can check if the field exists
>> in the db using $TYPO3_DB->admin_get_fields(tablename)? Isn't that a more
>> elegant solution?
>>
>> ./mads
>
> who knows if the field is really missing or unwanted?
> IMHO a TCA-setting should be done for determination.
>
> vg Steffen
>
>
More information about the TYPO3-dev
mailing list