Issue 105801

Summary: Add support to upate result set when based on a view, when the underlying database manager supports updateable views
Product: Base Reporter: villeroy <villeroy>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: drewjensen.inbox, issues
Version: OOo 3.1.1   
Target Milestone: ---   
Hardware: Unknown   
OS: All   
Issue Type: ENHANCEMENT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
DB with ViewDeleteDupes none

Description villeroy 2009-10-11 09:27:58 UTC
Don't know how to classify this. It behaves as desired but not specified, in the
wrong place though.

In the attached HSQLDB table "Data" has duplicates of Name AND Value.
"ViewDupes" gives an overview over duplicate entries.
"ViewDeleteDupes" shows all but the latest duplicates which can be deleted with:
DELETE FROM "Data" WHERE "ID" IN (SELECT "ID" FROM "ViewDeleteDupes");

The specified behaviour seems to be that all views are always read-only, even if
they rely on a single table including the PK. At least this is what I got used
to and "ViewDeleteDupes" gives a read-only record set.

OK, open "ViewDeleteDupes" for editing and run the query for preview
(menu:Edit>Run Query). The preview pane gives an editable row set where I can
delete my duplicates in a GUI.

I wish I could have editable row sets for regular use.
Comment 1 villeroy 2009-10-11 09:29:27 UTC
Created attachment 65293 [details]
DB with ViewDeleteDupes
Comment 2 drewjensen.inbox 2009-10-12 00:35:52 UTC
 see also:

[Informix] Views are not updateable
http://www.openoffice.org/issues/show_bug.cgi?id=86045

Updateable MySQL views cannot be updated via OOBase
http://www.openoffice.org/issues/show_bug.cgi?id=90393

writing to a writeable PostgreSQL view does not work
http://www.openoffice.org/issues/show_bug.cgi?id=96716

@Villeory - Currently HSQLdb 1.8 does not support updateable views. Version 1.9
lists support for this in the release notes, although I have not tested that
support in the current RC6 package. Nor would I have any knowledge of if/when
OO.o will move to 1.9.

As for supporting updateable views in the current package it has never, to my
knowledge, been support. (IIRC the MySQL native connector isn't supporting this
either)

That said I do believe that one can still update a view using a prepared
statement from witin a script currently and only the GUI lacks the option.

Now - I suppose all these issues should be pointing to some common record in the
tracking system