You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/11/30 17:10:39 UTC

[1/2] git commit: CIMI: Fix strange issue with Fedora MRI and Datamapper associations

Updated Branches:
  refs/heads/master 9c07013fe -> d9e21e027


CIMI: Fix strange issue with Fedora MRI and Datamapper associations


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/d9e21e02
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/d9e21e02
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/d9e21e02

Branch: refs/heads/master
Commit: d9e21e027c47dfd062cf97d1a2746d820a95d404
Parents: 321de1a
Author: Michal Fojtik <mf...@redhat.com>
Authored: Fri Nov 30 17:04:08 2012 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Fri Nov 30 17:04:08 2012 +0100

----------------------------------------------------------------------
 server/lib/db/provider.rb |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d9e21e02/server/lib/db/provider.rb
----------------------------------------------------------------------
diff --git a/server/lib/db/provider.rb b/server/lib/db/provider.rb
index 54fe2d7..25e2ca9 100644
--- a/server/lib/db/provider.rb
+++ b/server/lib/db/provider.rb
@@ -10,6 +10,17 @@ module Deltacloud
 
       has n, :entities
       has n, :machine_templates
+
+      # This is a workaround for strange bug in Fedora MRI:
+      #
+      def machine_templates
+        MachineTemplate.all(:provider_id => self.id)
+      end
+
+      def entities
+        Entity.all(:provider_id => self.id)
+      end
+
     end
 
   end