提交 2b795050 编写于 作者: R Raimonds Simanovskis 提交者: Aaron Patterson

fixed retrieval of primary key value in Ralation#insert method

previously primary key value was always assigned nil which caused Oracle enhanced adapter failing tests
上级 d9c8c47e
......@@ -31,7 +31,7 @@ def insert(values)
im = arel.compile_insert values
im.into @table
primary_key_name = @klass.primary_key
primary_key_value = Hash === values ? values[primary_key_name] : nil
primary_key_value = primary_key_name && Hash === values ? values[primary_key] : nil
@klass.connection.insert(
im.to_sql,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册