thanks Martin it worked!
although I replaced your (SELECT MAX(ID) FROM Properties)  by ROWID.
is it sound?

like that:
CREATE TRIGGER create_ingredient_property AFTER INSERT ON Ingredients
BEGIN
   INSERT INTO Properties (price) VALUES (NULL);
   UPDATE Ingredients
       SET property_ID = ROWID
       WHERE ID=OLD.ID;
END;


-- price doesn't matter. I set it up much later.. (whenever the user want, in fact), but I want my property line created and correctly linked!

Reply via email to