I'm building some SQL using constants in Kotlin strings, e.g.
"DELETE FROM ${SCHEMA}.TABLENAME WHERE PK = ?"
, and then preparing statements and injecting values.
IntelliJ can't resolve the table ("Unable to resolve table TABLENAME"), and I can't work out how to either (a) tell it not to try for this specific string, or (b) tell it where the table is.
m
Marc Knaup
08/27/2019, 9:11 PM
So why do you write TABLENAME in the string if the table doesn't have that name?
m
mathew murphy
08/27/2019, 9:11 PM
It does, under the appropriate schema.
mathew murphy
08/27/2019, 9:12 PM
e.g. Schemas DEV and PROD, both have a table called TABLENAME.
mathew murphy
08/27/2019, 9:12 PM
The table name is just an example. Could be anything.
mathew murphy
08/27/2019, 9:13 PM
Aha! Found the problem -- I hadn't hit the refresh button on the Database panel after changing the schema.