DT
Join ServerDrizzle Team
help
Alias in from() change? (SQLite)
Did something change wrt using aliases in
Previously:
In the current version, however, the query return type still has
from()
? Until recently I've been using aliases to affect the resulting object, but it seems to have stopped working as it did before.Previously:
const user = alias(User, "user");
const parent = alias(User, "parent");
const result = db
.select()
.from(user)
.leftJoin(parent, eq(user.parentId, parent.id))
.get();
console.log(result.user) // { user: {...}, parent: {...} }
In the current version, however, the query return type still has
user
in lowercase, but in the actual data it's uppercase, as if the alias is ignored (still working for innerJoin though).seems like a regression
will check
@tacomanator should be now fixed in
0.24.3