This is a bit related to this question: Joining same table multiple times in ServiceStack.OrmLite
TableAlias works with Select, but not SelectMulti.
Example:
var query = db.From<Department>(db.TableAlias("main"))
.Where(main => main.DepLevel == 3)
.Join<Department>((main, sub) => sub.DepParentNo == main.DepNo, db.TableAlias("sub"));
Now var rows = db.Select(query); works, but this crashes:
var queryResults = db.SelectMulti<Department, Department>(query);
I've confirmed that when using db.Select the LastCommandText correctly aliases all three tables. However it probably doesn't do that with SelectMulti.
The error message is as expected: The column prefix 'Department' does not match with a table name or alias name used in the query.