Bug 306960 - Kexi forms based on queries should not be read-only
Summary: Kexi forms based on queries should not be read-only
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: Forms (show other bugs)
Version: 2.5.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 22:01 UTC by Dirk Sarpe
Modified: 2014-12-03 01:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Sarpe 2012-09-17 22:01:03 UTC
Currently it is not possible to edit or add values in forms which are based on queries.

Reproducible: Always

Steps to Reproduce:
1. Create a query
2. Create a form that is based on it
3. Switch to data view in the form and try to edit the data
Actual Results:  
It is not possible to edit the data via the form.

Expected Results:  
Editing data via a form should be possible if the the form is based on a query as well.

An example database https://dl.dropbox.com/u/2658308/secondTry.kexi
Comment 1 Dimitrios T Tanis 2012-09-21 20:43:37 UTC
If I'm not mistaken, this is not Kexi's but rather SQLite's limitation.

Views in SQLite (aka queries) are read only, thus basing a form on a query makes it consequently read only.

Fixing this would require the use of an INSTEAD OF trigger in Kexi internals and change in query implementation, which I believe should be filed as a separate bug.

Thanks for the report.
Comment 2 Jarosław Staniek 2012-09-21 21:40:22 UTC
@Dimitrios: yes, views in SQLite 3 are read only (http://www.sqlite.org/lang_createview.html). But Kexi does not use views for its queries, so it's possible to determine if query can be writable (there may be several conditions, one of them is lack of aggregations). We're just not doing the checks now and we're marking all queries as read-only. Summing up, this wish is valid.