I have 2 tables that relate to each other using a foreign key constraint in the database.
I am using the Insert Table-Event to populate another table using the rawSQL plugin. So far so good.
Now I do like to use database sequences instead of Servoy sequences and when I fill the table with the event on it with a method I get errors on my rawSQL inserts.
The errors indicates that the record is not written to the back-end yet and my foreign key constraint prevents any records to be written to the other table.
Thinking about it I thought this makes sense because the is a pre-save trigger and the rawSQL plugin talks straight to the database…BUT. When I insert a record just by manually creating a record on the form, type in some data and click out of the field it suddenly all works!
It seems one of the 2 behaviors is a bug.
I hope it’s the first behavior but I can imagine it would be the second.
How would Servoy otherwise rollback an insert (unless they do use a database transaction when writing to the back-end database).
Servoy Developer
Version 3.5.6-build 519
Java version 1.5.0_13-119 (Mac OS X)
Case created with ID: 135913