[h2] Re: H2 Trigger doesn't Trigger properly

2019-08-05 Thread Evgenij Ryazanov
OK, let's test it with JDBC: import java.sql.*; import org.h2.api.Trigger; public class TestTrigger { public static class T implements Trigger { @Override public void init(Connection conn, String schemaName, String triggerName, String tableName, boolean before,

[h2] Re: H2 Trigger doesn't Trigger properly

2019-08-05 Thread Piotr
Yes, I made mistake when I was copying code. The class of course looks like this: public class TriggerBeforeInsert implements Trigger. The rest is unchanged. W dniu niedziela, 4 sierpnia 2019 17:48:40 UTC+2 użytkownik Piotr napisał: > > I'm Trying to create an H2 Trigger which should trigger

[h2] Re: H2 Trigger doesn't Trigger properly

2019-08-04 Thread Evgenij Ryazanov
Hello. On Sunday, 4 August 2019 23:48:40 UTC+8, Piotr wrote: > > I've created trigger: > > CREATE TRIGGER update_date Before INSERT ON notes FOR EACH ROW CALL > TriggerBeforeInsert.class.getName() > > I would like to set the version field to 1 whenever a new record is > inserted. Here is the