Subject Re: [firebird-support] View doesn't work properly
Author Ann W. Harrison
fehretic wrote:
> I have created a table with a tree structure.
>
> I also created a view from that table with BEFORE INSERT, UPDATE and
> DELETE triggers to update the underlying table.


In InterBase and Firebird versions before V2, a naturally updateable
view - a view of one table without a recursive join, group by, or
distinct - does the update directly and executes the triggers. In V2,
views with triggers will no longer do direct updates to the underlying
tables.


Rather than wait for V2, you can make your view artificially
non-updateable. One easy way to do that is to join your table to
RDB$DATABASE in the select clause of the view definition. There's only
one instance of that table in the database so you don't even need an ON
clause.


Regards,


Ann