DT
Drizzle Teamtacomanator

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).
B
bloberenober362d ago
seems like a regression will check
T
tacomanator362d ago
B
bloberenober362d ago
@tacomanator should be now fixed in 0.24.3