Fabrik/fabrik — pull request #1010 by jaanusnurmoja (2013-10-11 01:31:33+00:00)
Title: Display element without field behind it

An element with purpose to only display data without saving it would have much more if it doesn't have any database field behind. Let's imagine how much "garbage" we would have if we needed many display elements. Lot of empty fields only to be behind display element...

Finally I found a solution that should satisfy all:
1) when creating new element no new database fields are created
2) changing elements name doesn't have any affect to the db table
3) changing display element to something else creates the new database field
4) changing back to the display element doesn't have any affect to the db table and the field
5) renaming display element that could be on an existing field does nothing to the db field - it just leaves it in place

AND the most important:
Fabrik, when querying data DOESN't look for the database field with same name as element. Instead it queries "SELECT ..., '' AS tablename___elementname, ... That means we don't have any errors as "field not found" or something similar.

Feel free to test and say if I missed something.