-
Bug
-
Resolution: Done
-
Major
-
13.1
-
None
-
DV Sprint 61
-
0.5
-
-
Workaround Exists
-
An insert fails in the case of a Salesforce table with standard objects. For example, the Contact table (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contact.htm) in salesforce contains Name standard object: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_name.htm. The field can't be null, doesn't support create(), insert() and so on operations but should be filled automatically by salesforce. As a result when running the following query:
INSERT INTO sf34.Contact ("LastName", "FirstName", "Salutation", "MailingStreet", "MailingCity", "MailingPostalCode", "MailingCountry") VALUES ('Hillrichsen', 'Suse', 'Mrs.', 'Frankfurter Allee 29', 'Berlin', '10247','Deutschland') ;;
Teiid generates the following error:
2020-03-16 16:35:15,105 WARN [org.teiid.PROCESSOR] (Worker3_QueryProcessorQueue50) ij6teT/JNA+c TEIID30020 Processing exception for request ij6teT/JNA+c.18 'TEIID30492 Element sf34.Contact.Name of sf34.Contact is neither nullable nor has a default value. A value must be specified in the insert.'. Originally QueryValidatorException Request.java:343. Enable more detailed logging to see the entire stacktrace.
The problem can be solved by a native call, for example:
SELECT * FROM (call "sf34.native"('create;type=Contact;attributes=LastName,FirstName,Salutation,MailingStreet,MailingCity,MailingPostalCode,MailingCountry','Erich','Honecker','Herr','Magdalenenstr. 99','Berlin','11799','DE')) lpk ;;
but it won't work with dates/timestamps types (no sample request available).
- is related to
-
TEIID-5923 Salesforce: UPDATE fails for BOOLEAN and DATE fields
-
- Resolved
-