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.

This project is archived and is in readonly mode.

Arel is not building the correct expression for not(nil) as "IS NOT NULL"

#4441

Hello,

Building the expression with not(nil) does not produce a IS NOT NULL as expected but a '!= NULL' which does not work on PosgreSQL.

>> Hel::Core::Person.where(Hel::Core::Person.scoped.table[:name].eq(nil)).to_sql
=> "SELECT     "core_people".* FROM       "core_people" WHERE     ("core_people"."name" IS NULL)"

>> Hel::Core::Person.where(Hel::Core::Person.scoped.table[:name].not(nil)).to_sql
=> "SELECT     "core_people".* FROM       "core_people" WHERE     ("core_people"."name" != NULL)"

Reported by Daniele Orlandi · April 19th, 2010 @ 06:21 PM

State: duplicate
Milestone: 3.0.2
Assigned to: Emilio Tagua Emilio Tagua
Importance: Medium

Activity

  1. Santiago Pastorino
    Santiago Pastorino
    • Milestone cleared.
    • Tag changed from arel rails3 to arel rails3, patch
    • State changed from new to verified
    • Assigned user set to Emilio Tagua

    April 22nd, 2010 @ 12:24 AM

  2. Santiago Pastorino
  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from verified to duplicate

    This bug is for Arel LH

    April 22nd, 2010 @ 12:32 AM

  4. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Medium

    October 15th, 2010 @ 11:01 PM