https://kotlinlang.org logo
s

Shawn A

08/21/2019, 2:16 PM
I am using an
alias
to create a sub-query and then using that sub-query in a join. It looks like once you use an
alias
you can no longer reference the columns in the
ResultRow
by the original table's columns. Keys in the
ResultRow
from the alias look like
org.jetbrains.exposed.sql.Alias.name
. Is there any way to avoid this? I have common mapping code that assumes it can use the table class to reference columns. e.g (
DataSourceTable.name
).
t

tapac

08/21/2019, 10:07 PM
You may avoid using alias and join just with a query. Otherwise you have to use alias instance to get values from a ResultRow
s

Shawn A

08/21/2019, 10:32 PM
@tapac Ok, thanks. I was having an issue creating a join with a sub-query without an alias. The query is something like
select * from (sub-query) join other-table on ...
98 Views