java - How to make my trigger available in classpath (h2 database) -
when invoke query:
st.execute("create trigger mytrigger after insert on newpopulation each row call "\newpopulationtrigger\" ");
the console write: class newpopulationtrigger not found
how should follow sentence "the trigger class must available in classpath of database engine" - how can implement it?
my research: the example of issue /
adding classpath in scala
the package must given on left of class name.
in h2 example. package org.h2.samples
, class triggersample
create trigger inv_ins after insert on invoice each row call "org.h2.samples.triggersample"
the clean way in case ask full name in java:
st.execute("create trigger mytrigger after insert on newpopulation each row call \""+newpopulationtrigger.class.getname()+"\"");
Comments
Post a Comment