composite_primary_keys 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -147,7 +147,7 @@ module CompositePrimaryKeys
|
|
147
147
|
|
148
148
|
# Updates the associated record with values matching those of the instance attributes.
|
149
149
|
def update_without_callbacks
|
150
|
-
where_class = [self.class.primary_key, quoted_id].transpose.
|
150
|
+
where_class = [self.class.primary_key, quoted_id].transpose.map {|pair| "(#{pair[0]} = #{pair[1]})"}.join(" AND ")
|
151
151
|
connection.update(
|
152
152
|
"UPDATE #{self.class.table_name} " +
|
153
153
|
"SET #{quoted_comma_pair_list(connection, attributes_with_quotes(false))} " +
|
@@ -0,0 +1,23 @@
|
|
1
|
+
print "Using Oracle\n"
|
2
|
+
require_dependency 'fixtures/course'
|
3
|
+
require 'logger'
|
4
|
+
|
5
|
+
ActiveRecord::Base.logger = Logger.new STDOUT
|
6
|
+
ActiveRecord::Base.logger.level = Logger::WARN
|
7
|
+
|
8
|
+
# Set these to your database connection strings
|
9
|
+
db = ENV['ARUNIT_DB'] || 'ruby_ut'
|
10
|
+
|
11
|
+
ActiveRecord::Base.establish_connection(
|
12
|
+
:adapter => 'oracle',
|
13
|
+
:username => 'ruby_ut',
|
14
|
+
:password => 'ruby_ut1',
|
15
|
+
:database => db
|
16
|
+
)
|
17
|
+
|
18
|
+
Course.establish_connection(
|
19
|
+
:adapter => 'oracle',
|
20
|
+
:username => 'ruby_ut',
|
21
|
+
:password => 'ruby_ut1',
|
22
|
+
:database => db
|
23
|
+
)
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Composite Primary Keys for Ruby on Rails/ActiveRecords</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/compositekeys"; return false'>
|
35
35
|
Get Version
|
36
|
-
<a href="http://rubyforge.org/projects/compositekeys" class="numbers">0.7.
|
36
|
+
<a href="http://rubyforge.org/projects/compositekeys" class="numbers">0.7.2</a>
|
37
37
|
</div>
|
38
38
|
<h2>What</h2>
|
39
39
|
|
data/website/version-raw.js
CHANGED
data/website/version.js
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: composite_primary_keys
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2006-09-
|
6
|
+
version: 0.7.2
|
7
|
+
date: 2006-09-27 00:00:00 +02:00
|
8
8
|
summary: Support for composite primary keys in ActiveRecords
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -58,7 +58,9 @@ files:
|
|
58
58
|
- test/create_test.rb
|
59
59
|
- test/santiago_test.rb
|
60
60
|
- test/connections/native_mysql
|
61
|
+
- test/connections/native_oracle
|
61
62
|
- test/connections/native_mysql/connection.rb
|
63
|
+
- test/connections/native_oracle/connection.rb
|
62
64
|
- test/fixtures/reference_type.rb
|
63
65
|
- test/fixtures/reference_code.rb
|
64
66
|
- test/fixtures/reference_types.yml
|