Subject | trigger not firing? |
---|---|
Author | |
Post date | 2018-09-25T14:49:39Z |
Hello! I use FB 2.5. I know that this its almos imposible, but just in case I ask. Is there any chance that a trigger is not firing at all?
I have this very simple trigger to create one record for each warehouse in the "stock" table. But I've found that quite a lot of articles (in the stock table) doesn't have its records in the "sto_cantidades" table.
It is possible that some kind of corruption causes that? or should I chek my entire code and see if that records are somehow being deleted?
thanks!!
CREATE OR ALTER trigger stock_ai5 for stock
active after insert position 5
AS
declare variable loc_id fk_id;
begin
for select id from sto_depositos where activo = 1 into :loc_id do
begin
insert into sto_cantidades (id_stock, id_sto_depositos, cantidad) values (new.id, :loc_id, 0);
end
end