Thanks for the quick reply.
I've put the following entry in the mapping file:
Code:
<id name="id" column="ID" type="long">
<generator class="native">
<param name="sequence">S_1258_1_MPAN_REPORTS</param>
</generator>
</id>
The trigger is as follows:
Code:
CREATE OR REPLACE TRIGGER NHHDC_1_5."TR_S_1258_1_MPAN_REPORTS" BEFORE
INSERT ON "NHHDC_1_5"."MPAN_REPORTS" FOR EACH ROW
BEGIN
SELECT NHHDC_1_5.S_1258_1_MPAN_REPORTS.NEXTVAL
INTO :NEW.ID
FROM dual;
END;
/
But I'm still getting an ORA-02289 error i.e. sequence does not exist.
org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not get next sequence value; bad SQL grammar [select hibernate_sequence.nextval from dual]; nested exception is java.sql.SQLException: ORA-02289: sequence does not exist
java.sql.SQLException: ORA-02289: sequence does not exist
Any ideas what I might be doing wrong?