Lookup Call [message #1814347] |
Mon, 09 September 2019 23:22  |
Eclipse User |
|
|
|
Hello Sir,
I am using Lookup Call to populate records on ListBox but error on server side occurs as shown below:
2019-09-10 01:39:51,494 ERROR [qtp925973605-16] org.eclipse.scout.rt.platform.exception.ExceptionHandler.handlePlatformException(ExceptionHandler.java:124) - -Ex: org.eclipse.scout.rt.platform.exception.PlatformException: ERROR: operator does not exist: integer = character varying
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
Position: 87 [translator=org.eclipse.scout.rt.platform.exception.PlatformExceptionTranslator, user=xxx, statement=SQL with binds:
SELECT ID,
TITLE
FROM SAM
WHERE 1 = 1
AND (:master IS NULL
OR
ID = :master)
IN :master => ? [VARCHAR null]
IN :master => ? [VARCHAR null], service.name=xx.yy.zz.sample.shared.prime.ISampleLookupService, service.operation=getDataByAll]
I have another form where it has an smart field and i used this lookupCall to provide the list of item and it works well. In this form i provided the master field. Could it be because i did not provided the master field on the first mentioned form (listbox)? If yes, then every lookupCall having a master attribute on its SQl query must have a master field provided? Or did i missed something on LookupCall approach?
Hope someone can help me on this matter.. Thank you..
Sincerely,
mark
|
|
|
|
Re: Lookup Call [message #1814351 is a reply to message #1814348] |
Tue, 10 September 2019 02:05  |
Eclipse User |
|
|
|
Thanks for a quick reply. I think there's a missed representation of key(:master) value with the SQL error logs because when a try to execute the SQL statement provided on the error logs and replace the :master key with is value say a "null" on the PostgreSQL, it works fine and provided a results.
Error logs sql statement:
SELECT ID, TITLE
FROM SAM
WHERE 1 = 1 AND (:master IS NULL OR ID = :master)
Replacing master key with its value: null based on the error log message:
SELECT ID, TITLE
FROM SAM
WHERE 1 = 1 AND (null IS NULL OR ID = null) --> this sql statement works fine on PosgreSQL.
Replacing master key with a value: null:varchar. Identifying possible actual value of master key:
SELECT ID, TITLE
FROM SAM
WHERE 1 = 1 AND (null::varchar IS NULL OR ID = null::varchar) --> ERROR: operator does not exist: integer = character varying LINE 7: COMCATID = null::varchar ) ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
So, may be if a master field is not provided the master key will have a default value of: null::varchar or null::char, the two value will provide the same error messages.
The error just disappeared when i added one field(smart field) on the form (type Long) and make it a master field of the listbox for lookup call and set it as mandatory.
Again, thanks you very much for a quick reply i was really waiting for someone to fetch some idea on the possible cause of the error..
sincerely,
mark
|
|
|
Powered by
FUDForum. Page generated in 1.25834 seconds