{"issue":{"state":"open","created_at":"2011-12-05T19:03:11Z","updated_at":"2011-12-05T19:03:12Z","comments":0,"user":{"gravatar_id":"eb105e990459d464ca49e9692410dc3a","id":734757,"url":"https://api.github.com/users/techsplicer","login":"techsplicer","avatar_url":"https://secure.gravatar.com/avatar/eb105e990459d464ca49e9692410dc3a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I have encountered an issue when using the 1.4.0 tagged adapter.\r\n\r\nSpecifically, we have tables that use triggers/sequences to generate ids for inserted records.  When looking through the logging output of rails, i discoverd that our INSERT statements were not being logged.  Below is the message in my logs..\r\n\r\n2011-12-05 10:11:06 default: ERROR [pid: 713] log_subscriber.rb:92:in `call' - Could not log \"sql.active_record\" event. NoMethodError: undefined method `name' for :returning_id:Symbol\r\n\r\nI have narrowed this down to how the methods 'sql_for_insert' and 'exec_insert' add a :returning_id column to the binds array.  When ActiveRecord:: LogSubscriber attempts to log the sql, the following is executed and it fails for our :returning_id column as the symbol has no #name signature while the other column for the record do.  I would propose a fix, but i am still digging through the oracle adapter code and am not quite sure how to define a column type for the returning_id.  \r\n\r\n      unless (payload[:binds] || []).empty?\r\n        binds = \"  \" + payload[:binds].map { |col,v|\r\n          [col.name, v]\r\n        }.inspect\r\n      end","assignee":null,"id":2453082,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"number":134,"labels":[],"title":"Logging 'sql.active_record' events fail for statements with :returning_id columns","html_url":"https://github.com/rsim/oracle-enhanced/issues/134","closed_at":null,"url":"https://api.github.com/repos/rsim/oracle-enhanced/issues/134","milestone":null},"action":"opened"}