See #220:
Since this method is quite complex I'd love to have some unit tests.
Cases that should be covered IMHO:
entity =/!= null
column w/wo alias
demonstrating what the column-> field+table -> column roundtrip does.
SimpleFunction w/wo recursion
Aliased or not
Error case.