1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Not editable datawriter fields

Discussion in 'Closed Suggestions' started by xf_phantom, Jul 8, 2013.

  1. xf_phantom

    xf_phantom Well-Known Member

    What about a new key for the _getfields method to be able to define a field as "not changeable/editable".
    I want to be able to define a field while the record creation, but non other part of the application "should" be able to change this via the datawriter.(i'm aware that this won't be needed very often and that the definition in the dw is still not 100% secure because another coder could run a sql query and change the field, but at least the datawriter api wouldn't allow this and other devs working with our api would see, that this feeld shouldn't be thouched).

    ATM we're checking this inside of the _preSave method, but it would be much easier & less code, if the xf datawriter would provide this:)
    protected function _getFields()
         return array(
           'foo' => array(
             'edit_history_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true),
             'name_type'  => array('type' => self::TYPE_STRING, 'editable'=>false

Share This Page