Record r = dsl.insertInto(MPS_PEOPLE)
.set(MPS_PEOPLE.PPLE_ID, Sequences.MPS_PPLE_SEQ.nextval()) <-- only this line was added (in MySQL this used to be an auto-increment column)
.set(MPS_PEOPLE.OPERATIONAL_INITIALS, atco.getInitials())
.set(MPS_PEOPLE.FIRST_NAME, atco.getFirstName())
.set(MPS_PEOPLE.SURNAME, atco.getSurName())
.set(MPS_PEOPLE.EMAIL_ADDRESS, atco.getEmail())
.set(MPS_PEOPLE.GENDER, "M")
.set(MPS_PEOPLE.BIRTH_DATE, new Date(0))
.set(MPS_PEOPLE.START_DATE, new Date(0))
.set(MPS_PEOPLE.REPORTING_MANAGER, "N")
.set(MPS_PEOPLE.COUNTERSIGNING_MANAGER, "N")
.set(MPS_PEOPLE.AUTOMATIC_INPUT, "N")
.set(MPS_PEOPLE.CREATED_BY, "1")
.set(MPS_PEOPLE.CREATED_DATE, new Date(System.currentTimeMillis()))
.set(MPS_PEOPLE.MODIFIED_BY, "1")
.set(MPS_PEOPLE.MODIFIED_DATE, new Date(System.currentTimeMillis()))
.returning(MPS_PEOPLE.PPLE_ID)
.fetchOne();
int id = r.getValue(MPS_PEOPLE.PPLE_ID).intValue();
org.jooq.exception.DataAccessException: SQL [insert into "MPS"."MPS_PEOPLE" ("PPLE_ID", "OPERATIONAL_INITIALS", "FIRST_NAME", "SURNAME", "EMAIL_ADDRESS", "GENDER", "BIRTH_DATE", "START_DATE", "REPORTING_MANAGER", "COUNTERSIGNING_MANAGER", "AUTOMATIC_INPUT", "CREATED_BY", "CREATED_DATE", "MODIFIED_BY", "MODIFIED_DATE") values ("MPS"."MPS_PPLE_SEQ".nextval, ?, ?, ?, ?, ?, cast(? as date), cast(? as date), ?, ?, ?, ?, cast(? as date), ?, cast(? as date))]; ORA-04043: object "MPS" does not exist
int id = dsl.select(Sequences.MPS_PPLE_SEQ.nextval()).fetchOne().value1().intValue();
int count = dsl.insertInto(MPS_PEOPLE)
.set(MPS_PEOPLE.PPLE_ID, (long) id)
.set(MPS_PEOPLE.OPERATIONAL_INITIALS, atco.getInitials())
.set(MPS_PEOPLE.FIRST_NAME, atco.getFirstName())
.set(MPS_PEOPLE.SURNAME, atco.getSurName())
.set(MPS_PEOPLE.EMAIL_ADDRESS, atco.getEmail())
.set(MPS_PEOPLE.GENDER, "M")
.set(MPS_PEOPLE.BIRTH_DATE, new Date(0))
.set(MPS_PEOPLE.START_DATE, new Date(0))
.set(MPS_PEOPLE.REPORTING_MANAGER, "N")
.set(MPS_PEOPLE.COUNTERSIGNING_MANAGER, "N")
.set(MPS_PEOPLE.AUTOMATIC_INPUT, "N")
.set(MPS_PEOPLE.CREATED_BY, "1")
.set(MPS_PEOPLE.CREATED_DATE, new Date(System.currentTimeMillis()))
.set(MPS_PEOPLE.MODIFIED_BY, "1")
.set(MPS_PEOPLE.MODIFIED_DATE, new Date(System.currentTimeMillis()))
.execute();
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
Oracle Database version | JDBC Jar files specific to the release |
12.2 or 12cR2 | ojdbc8.jar with JDK 8 |
12.1 or 12cR1 | ojdbc7.jar with JDK 7 and JDK 8 ojdbc6.jar with JDK 6 |
11.2 or 11gR2 | ojdbc6.jar with JDK 6, JDK 7, and JDK 8 (Note: JDK7 and JDK8 are supported in 11.2.0.3 and 11.2.0.4 only) ojdbc5.jar with JDK 5 |