rsim/oracle-enhanced — pull request #274 by yahonda (2013-01-11 15:49:23+00:00)
Title: Address :returning_id column should be of type Column

This pull request addresses isssue #134 and add a testcase for #252.

Eight of tests in `./spec/active_record/connection_adapters/oracle_enhanced_schema_statements_spec.rb` generate the error message below.

```ruby
Could not log "sql.active_record" event. NoMethodError: undefined method `name' for :returning_id:Symbol`
```
And #252 addresses this error message.

```ruby
180 it "should return new key value using connection insert method" do
181 insert_id = @conn.insert("INSERT INTO test_employees (first_name) VALUES ('Raimonds')", nil, "id")
182 @conn.select_value("SELECT test_employees_seq.currval FROM dual").should == insert_id
183 end
```

```ruby
185 it "should create new record for model" do
186 e = TestEmployee.create!(:first_name => 'Raimonds')
187 @conn.select_value("SELECT test_employees_seq.currval FROM dual").should == e.id
188 end
```

```ruby
210 it "should return new key value using connection insert method" do
211 insert_id = @conn.insert("INSERT INTO test_employees (first_name) VALUES ('Raimonds')", nil, "id")
212 @conn.select_value("SELECT test_employees_seq.currval FROM dual").should == insert_id
213 end
```

```ruby
215 it "should create new record for model" do
216 e = TestEmployee.create!(:first_name => 'Raimonds')
217 @conn.select_value("SELECT test_employees_seq.currval FROM dual").should == e.id
218 end
```

```ruby
247 it "should return new key value using connection insert method" do
248 insert_id = @conn.insert("INSERT INTO test_employees (first_name) VALUES ('Raimonds')", nil, @primary_key)
249 @conn.select_value("SELECT #{@sequence_name}.currval FROM dual").should == insert_id
250 end
```

```ruby
252 it "should create new record for model with autogenerated sequence option" do
253 e = TestEmployee.create!(:first_name => 'Raimonds')
254 @conn.select_value("SELECT #{@sequence_name}.currval FROM dual").should == e.id
255 end

```ruby
283 it "should return new key value using connection insert method" do
284 insert_id = @conn.insert("INSERT INTO test_employees (first_name) VALUES ('Raimonds')", nil, "id")
285 @conn.select_value("SELECT #{@sequence_name}.currval FROM dual").should == insert_id
286 end
```

```ruby
288 it "should create new record for model with autogenerated sequence option" do
289 e = TestEmployee.create!(:first_name => 'Raimonds')
290 @conn.select_value("SELECT #{@sequence_name}.currval FROM dual").should == e.id
291 end
```