Open deusaquilus opened 5 years ago
I was going to fix this in #1302 but I don't think that I will. The chief problem here is that for some operations like Option[T].getOrElse
, it is very difficult to determine whether there is actually a row type or column type involved. Even if I check to see that T
is a case class, it is possible that the case class is just the result of a custom encoder as opposed to an actual row type. For this reason I think the issue will remain for now.
Version: (e.g.
3.0.0-SNAPSHOT
) Module: (e.g.quill-sql
) Database: (e.g.any
)Expected behavior
The following should fail to generate SQL since null checking a table alias is completely invalid in SQL:
Actual behavior
Instead not only does it not fail, but it produces a completely ridiculous query:
The FlattenOptionOperation must be passed additional information to know whether it is working with a table or a column. This is related to #1053
Workaround
Do not use getOrElse on a table
@getquill/maintainers