1

I got a table that contains (amongst others), columns

docusign_account_id TEXT NOT NULL,
docusign_envelope_id TEXT NOT NULL,

(which are the only docusign_... columns).

I'd like to bundle those into an embeddable with a configuration like

embeddables {
    embeddable {
        name = "DOCUSIGN_ENVELOPE_DETAILS"
        tables = "version"
        fields {
            field {
                name = "ENVELOPE_ID"
                expression = "DOCUSIGN_ENVELOPE_ID"
            }
            field {
                name = "ACCOUNT_ID"
                expression = "DOCUSIGN_ACCOUNT_ID"
            }
        }
    }
}

turns out, though, that I'm running into nullpointer exceptions actually using those because the setter for the embeddable does not use the correct indices for the fields, e.g. offset 15 for the field, but offset 16 when set by embeddable

/**
 * Setter for <code>public.version.docusign_account_id</code>.
 */
public void setDocusignAccountId(String value) {
    set(15, value);
}
/**
 * Setter for the embeddable <code>public.DOCUSIGN_ENVELOPE_DETAILS</code>.
 */
public void setDocusignEnvelopeDetails(DocusignEnvelopeDetailsRecord value) {
    set(12, value.getEnvelopeId());
    set(16, value.getAccountId());
}

Not sure how to resolve this (other than just avoiding the "feature" altogether).

Manual correction will un-correct this on next codegen.

Is there additional configuration that needs be done?

User1291
  • 7,664
  • 8
  • 51
  • 108
  • That looks like a bug. Would you mind reporting it with a few more reproduction steps here: https://github.com/jOOQ/jOOQ/issues/new/choose (mostly, including the `CREATE TABLE` statement, plus any other code generation configuration that you've used) – Lukas Eder Oct 01 '22 at 09:08

0 Answers0