NDB is rewriting values for same named columns in join

Notice: This thread is very old.
Member | 34

Consider having two tables

A       B
--      --
id      id
name    a_id

When I do

$a = $db->table('A')->where(':B.name = ?', 'something')->fetch();

I get value from B.id instead of A.id as I would expect.
This is happening for all columns with the same names in both tables.

Am I doing something wrong or is it a bug in Nette\Database?

Member | 910

cant reproduce this bug

http://prntscr.com/6vzl33 – structure
http://prntscr.com/6vzlpg – data a table
http://prntscr.com/6vzlt5 – data b table
http://prntscr.com/6vzla4 – code
http://prntscr.com/6vzlev – response