Displaying 2 results from an estimated 2 matches for "alias_0".
Did you mean:
alias_
2007 Dec 12
2
possible bug in eager loading
..._data =>
:user_data_field}, :order => "username = ''someone-oHC15RC7JGTNLxjTenLetw@public.gmane.org'' desc",
:limit => 50)
This produces:
User Load IDs For Limited Eager Loading (74.648762) SELECT * FROM
(SELECT DISTINCT ON (users.id) users.id, username AS alias_0 FROM users
LEFT OUTER JOIN user_data ON user_data.user_id = users.id LEFT OUTER
JOIN user_data_fields ON user_data_fields.id = user_data.field_id ) AS
id_list ORDER BY id_list.alias_0 DESC LIMIT 50
User Load Including Associations (0.026093) SELECT users."id" AS
t0_r0, users.&quo...
2011 Feb 17
1
Select distinict on not chainable with order method
...Using this scope alone is working correct, however chaining that scope
with order method, throws strange error:
Beer.with_unique_brand.order("created_at"):
Beer Load (1.1ms) SELECT * FROM (SELECT DISTINCT ON
(beers.brand_id) beers.* FROM "beers") AS id_list ORDER BY
id_list.alias_0
PGError: ERROR: column id_list.alias_0 does not exist
LINE 1: ...and_id) beers.* FROM "beers") AS id_list ORDER BY
id_list.al...
^
: SELECT * FROM (SELECT DISTINCT ON (beers.brand_id) beers.* FROM
"beers") AS id_list...