Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

omarqureshi's latest activity

Sunday, April 17 2011
6032 The postgres connection adaptor does not correctly identify Primary Keys in V... was updated in Ruby on Rails
  • omarqureshi
    omarqureshi commented at 4:09 PM

    I wonder if instead of the primary key fix being applied here, it should be applied closer to the adaptor - as in something like

    (row && row.first) || "id"
    

    wi...

  • omarqureshi
    • Title changed from Arel 2 does not work well with views on postgresql to The postgres connection adaptor does not correctly identify Primary Keys in Views and Inherited Tables
    by omarqureshi at 3:56 PM
  • omarqureshi
    • Tag changed from database views, activerecord, arel, arel2, postgresql to database views, activerecord, arel, arel2, postgres-inherited-tables, postgresql
    by omarqureshi at 3:55 PM
  • omarqureshi
    • Tag changed from database views, arel, arel2, postgresql to database views, activerecord, arel, arel2, postgresql
    by omarqureshi at 3:53 PM

    Problem method found:

      def primary_key(table)
        row = exec_query(<<-end_sql, 'SCHEMA', [[nil, table]]).rows.first
          SELECT DISTINCT(attr.attname)
          ...
Tuesday, April 12 2011
6032 Arel 2 does not work well with views on postgresql was updated in Ruby on Rails
  • omarqureshi
    omarqureshi commented at 3:14 PM

    This is also a problem if you are using inherited tables. Although in that case, you can get by, through using set_primary_key "id", for views however, it doesn...

Sunday, January 16 2011
5951 Using :joins when calling first on an association ignores joins was updated in Ruby on Rails
  • omarqureshi
    omarqureshi commented at 1:04 AM

    Sorry, have come back to this after a long hiatus.

    Isn't this what is required? The problem is the joins, not the select clause and infact, is probably preferab...

Thursday, November 11 2010
5951 Using :joins when calling first on an association ignores joins was created in Ruby on Rails
  • omarqureshi
    omarqureshi created the ticket at 9:34 AM

    Running the following test:

      def test_using_joins_on_many_association_with_has_one_join
        parrot = Parrot.create!(:name => "Petal")
        pirate_with_a_ship =...
Friday, October 22 2010
5669 Setting session and cookie variables in same request breaks session in follow... was updated in Ruby on Rails
  • omarqureshi
    omarqureshi commented at 6:17 PM

    Awesome - thank you!

Monday, October 11 2010
5669 Setting session and cookie variables in same request breaks session in follow... was updated in Ruby on Rails
  • omarqureshi
    omarqureshi commented at 12:46 PM

    This time updated with a properly formatted patch

Monday, September 27 2010
5669 Setting session and cookie variables in same request breaks session in follow... was updated in Ruby on Rails
  • omarqureshi
    • Tag changed from rails 2.3.9, active_record_store, cookies, sessions to rails 2.3.9, active_record_store, cookies, patch, sessions
    by omarqureshi at 9:25 AM