Alias in from() change? (SQLite)

Did something change wrt using aliases in 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: {...} }
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).
3 Replies
Dan
Dan2y ago
seems like a regression will check
tacomanator
tacomanatorOP2y ago
Dan
Dan2y ago
@tacomanator should be now fixed in 0.24.3
Want results from more Discord servers?
Add your server