1st off Xataface is great stuff. Kudos to you and all your hard work.
I'm using version 1.1.5. My fields.ini has __sql__ in it. The odd thing I am seeing is that visibility:list=hidden is not being handled for all of the columns that are defined in __sql__.
Here is a section in my fields.ini :
- Code: Select all
__sql__ = "select cp_id,
cc_sort_order,
cp_category_id,
cp_notes,
cp_short_description,
cp_target_date,
cp_focus,
cp_create_date,
cp_update_date
from cas_priorities cp
left join cas_categories cc
on cp_category_id = cc_id"
[cc_sort_order]
visibility:list=hidden
[cp_id]
visibility:list=hidden
----
What I am seeing is that cc_sort_order is hidden in the list view, but cp_id is not. The pattern I am seeing is that if I set visibility:hidden for columns that are selected from the main table (cas_priorities), they still show up however for the joined table (cas_categories) the columns are hidden - as expected.
This does not happen when I do not include __sql__ in my fields.ini. The fields set visibility:list=hidden work as expected.
I put in a cheesy workaround where I wrapped the SQL in a subselect like this:
- Code: Select all
__sql__ = "select *
from
(
select cp_id,
cc_sort_order,
cp_category_id,
cp_notes,
cp_short_description,
cp_target_date,
cp_focus,
cp_create_date,
cp_update_date
from cas_priorities cp
left join cas_categories cc
on cp_category_id = cc_id
) results"
----
With my workaround the fields set visibility:list=hidden work as expected.
Any ideas?