caruby-tissue 1.5.3 → 1.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,6 +1,10 @@
1
1
  This history lists major release themes. See the GitHub Commits (https://github.com/caruby/tissue)
2
2
  for change details.
3
3
 
4
+ 1.5.4 / 2011-08-16
5
+ ------------------
6
+ * Fixed case sensitive DB bug. Bug # 7.
7
+
4
8
  1.5.3 / 2011-07-08
5
9
  ------------------
6
10
  * Clean up documentation.
@@ -113,6 +113,9 @@ module CaTissue
113
113
  # @quirk caTissue The caTissue 1.1.2 DYNEXT_ROLE table omits the target name for seven annotations,
114
114
  # e.g. SCG RadicalProstatectomyMargin. Work-around is to try the query with a null role name.
115
115
  #
116
+ # @quirk caTissue The role can be a mutation of the demodulized class name as follows:
117
+ # * decapitalization, e.g. role +specimenCollectionGroup+ for class +SpecimenCollectionGroup+
118
+ #
116
119
  # @param [AnnotationClass] klass the annotation class
117
120
  # @param [Symbol] attribute the owner attribute
118
121
  # @param [Integer] eid the annotation entity id
@@ -123,6 +126,10 @@ module CaTissue
123
126
  tgt_nm = klass.attribute_metadata(attribute).type.name.demodulize
124
127
  result = CaTissue::Database.instance.executor.execute { |dbh| dbh.select_one(OWNER_COLUMN_SQL, eid, tgt_nm) }
125
128
  col = result[0] if result
129
+ if col.nil? then
130
+ result = CaTissue::Database.instance.executor.execute { |dbh| dbh.select_one(OWNER_COLUMN_SQL, eid, tgt_nm.decapitalize) }
131
+ col = result[0] if result
132
+ end
126
133
  if col.nil? then
127
134
  result = CaTissue::Database.instance.executor.execute { |dbh| dbh.select_one(ALT_1_1_OWNER_COLUMN_SQL, eid) }
128
135
  col = result[0] if result
@@ -162,8 +169,10 @@ EOS
162
169
  and role.name = ?
163
170
  EOS
164
171
 
165
- # SQL to get the annotation reference column name for a given annotation target entity id.
166
- # The target entity id is obtained by calling {EntityFacade#associated_entity_id}.
172
+ # Alternative caTissue 1.1.x SQL to get the annotation reference column name for a given
173
+ # annotation target entity id. The role can be null for some entities in 1.1, as described
174
+ # in {#owner_attribute_column}. The target entity id is obtained by calling
175
+ # {EntityFacade#associated_entity_id}.
167
176
  ALT_1_1_OWNER_COLUMN_SQL = <<EOS
168
177
  select cst.TARGET_ENTITY_KEY
169
178
  from DYEXTN_CONSTRAINT_PROPERTIES cst, DYEXTN_ASSOCIATION assn, dyextn_role role
@@ -1,6 +1,6 @@
1
1
  module CaTissue
2
2
  # The version of this caRuby Tissue release.
3
- VERSION = "1.5.3"
3
+ VERSION = "1.5.4"
4
4
 
5
5
  # The supported caTissue release versions.
6
6
  CATISSUE_VERSIONS = "1.1.2-1.2"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caruby-tissue
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 3
10
- version: 1.5.3
9
+ - 4
10
+ version: 1.5.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - OHSU
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-08 00:00:00 -07:00
18
+ date: 2011-09-22 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency