You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should get probably two or more rows/objects that have the same id but with the other parameters completly different (assuming this on the database).
I tried this sql query directly on my database and I got what I supposed to get.
PD: I checked what knex is returning and it's the same what I got when querying directly on my database, meaning no bugs (so this is no knex's issue)
PD2: This issue can be solved ussing qb.select('table_a.id as some_id'). However, I think this should be fixed.
The text was updated successfully, but these errors were encountered:
Introduction
As the title says, when I use the query function over a model and then use fetchAll, I got duplicated objects (bookshelf models).
Issue Description
I have two tables: (table_a & table_b)
sql:
select table_a.id, table_a.column_1, table_b.column.fk, table_b.column_3 from table_a inner join table_b on table_a.column_fk = table_b.column_fk;
On bookshelf:
model for table_a:
Packages version
database: postgresql
knex: v0.13.0
bookshelf: v.0.12.1
nodejs: 6.12.3
Expected behaviour
I should get probably two or more rows/objects that have the same id but with the other parameters completly different (assuming this on the database).
I tried this sql query directly on my database and I got what I supposed to get.
example:
Actual behaviour
I got duplicated objects that have the same id
PD: I checked what knex is returning and it's the same what I got when querying directly on my database, meaning no bugs (so this is no knex's issue)
PD2: This issue can be solved ussing
qb.select('table_a.id as some_id')
. However, I think this should be fixed.The text was updated successfully, but these errors were encountered: