a very minimal fix for now (ignoring the db fact name dups)

```diff
diff --git a/app/models/host/base.rb b/app/models/host/base.rb
index ee068e7..75a44dc 100644
--- a/app/models/host/base.rb
+++ b/app/models/host/base.rb
     # Inspired from Puppet::Rails:Host
@@ -82,7 +83,7 @@ module Host
       FactValue.delete(deletions) unless deletions.empty?
 
       # Get FactNames in one call
-      fact_names = FactName.maximum(:id, :group => 'name')
+      fact_names = Hash[FactName.reorder('').group(:name).select('DISTINCT(name), id').map{|f| [f.name, f.id]}]
 
       # Create any needed new FactNames
       facts.each do |name, value|
@@ -91,8 +92,8 @@ module Host
 
         values.each do |v|
           next if v.nil?
-          fact_values.build(:value => v, :fact_name => fact_names.keys.include?(name) ?
-                                         fact_names[name] : FactName.create!(:name => name))
+          fact_values.build(:value => v, :fact_name_id => fact_names.keys.include?(name) ?
+                                         fact_names[name] : FactName.create!(:name => name).id)
         end
       end