[jOOQ/jOOQ#7962] ORA-04043 on INSERT when using qualified, quoted table name and fetching generated keys

This commit is contained in:
Lukas Eder 2020-02-07 16:56:42 +01:00
parent 5bf3d9f57f
commit 175937f41a
3 changed files with 60 additions and 0 deletions

View File

@ -243,6 +243,8 @@ public class Settings
protected String parseIgnoreCommentStart = "[jooq ignore start]";
@XmlElement(defaultValue = "[jooq ignore stop]")
protected String parseIgnoreCommentStop = "[jooq ignore stop]";
@XmlElement(defaultValue = "true")
protected Boolean applyWorkaroundFor7962 = true;
@XmlElementWrapper(name = "interpreterSearchPath")
@XmlElement(name = "schema")
protected List<InterpreterSearchSchema> interpreterSearchPath;
@ -2065,6 +2067,30 @@ public class Settings
this.parseIgnoreCommentStop = value;
}
/**
* [#7963] Apply workaround for ORA-04043 when inserting into Oracle tables with qualified, quoted identifiers, and fetching generated keys
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isApplyWorkaroundFor7962() {
return applyWorkaroundFor7962;
}
/**
* Sets the value of the applyWorkaroundFor7962 property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setApplyWorkaroundFor7962(Boolean value) {
this.applyWorkaroundFor7962 = value;
}
public List<InterpreterSearchSchema> getInterpreterSearchPath() {
if (interpreterSearchPath == null) {
interpreterSearchPath = new ArrayList<InterpreterSearchSchema>();
@ -2760,6 +2786,11 @@ public class Settings
return this;
}
public Settings withApplyWorkaroundFor7962(Boolean value) {
setApplyWorkaroundFor7962(value);
return this;
}
public Settings withInterpreterSearchPath(InterpreterSearchSchema... values) {
if (values!= null) {
for (InterpreterSearchSchema value: values) {
@ -2889,6 +2920,7 @@ public class Settings
builder.append("parseIgnoreComments", parseIgnoreComments);
builder.append("parseIgnoreCommentStart", parseIgnoreCommentStart);
builder.append("parseIgnoreCommentStop", parseIgnoreCommentStop);
builder.append("applyWorkaroundFor7962", applyWorkaroundFor7962);
builder.append("interpreterSearchPath", "schema", interpreterSearchPath);
builder.append("parseSearchPath", "schema", parseSearchPath);
}
@ -3677,6 +3709,15 @@ public class Settings
return false;
}
}
if (applyWorkaroundFor7962 == null) {
if (other.applyWorkaroundFor7962 != null) {
return false;
}
} else {
if (!applyWorkaroundFor7962 .equals(other.applyWorkaroundFor7962)) {
return false;
}
}
if (interpreterSearchPath == null) {
if (other.interpreterSearchPath!= null) {
return false;
@ -3787,6 +3828,7 @@ public class Settings
result = ((prime*result)+((parseIgnoreComments == null)? 0 :parseIgnoreComments.hashCode()));
result = ((prime*result)+((parseIgnoreCommentStart == null)? 0 :parseIgnoreCommentStart.hashCode()));
result = ((prime*result)+((parseIgnoreCommentStop == null)? 0 :parseIgnoreCommentStop.hashCode()));
result = ((prime*result)+((applyWorkaroundFor7962 == null)? 0 :applyWorkaroundFor7962 .hashCode()));
result = ((prime*result)+((interpreterSearchPath == null)? 0 :interpreterSearchPath.hashCode()));
result = ((prime*result)+((parseSearchPath == null)? 0 :parseSearchPath.hashCode()));
return result;

View File

@ -106,6 +106,7 @@ import org.jooq.ExecuteContext;
import org.jooq.ExecuteListener;
import org.jooq.Field;
import org.jooq.Identity;
import org.jooq.Insert;
import org.jooq.Name;
import org.jooq.Param;
// ...
@ -246,6 +247,19 @@ abstract class AbstractDMLQuery<R extends Record> extends AbstractRowCountQuery
return table();
}

View File

@ -502,6 +502,10 @@ jOOQ queries, for which no specific fetchSize value was specified.]]></jxb:javad
<element name="parseIgnoreCommentStop" type="string" minOccurs="0" maxOccurs="1" default="[jooq ignore stop]">
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[[#8325] The ignore comment stop token]]></jxb:javadoc></jxb:property></appinfo></annotation>
</element>
<element name="applyWorkaroundFor7962" type="boolean" minOccurs="0" maxOccurs="1" default="true">
<annotation><appinfo><jxb:property><jxb:javadoc><![CDATA[[#7963] Apply workaround for ORA-04043 when inserting into Oracle tables with qualified, quoted identifiers, and fetching generated keys]]></jxb:javadoc></jxb:property></appinfo></annotation>
</element>
</all>
</complexType>