lib/og/store/kirby.rb in og-0.27.0 vs lib/og/store/kirby.rb in og-0.28.0

- old
+ new

@@ -66,18 +66,14 @@ def enchant(klass, manager) klass.send :attr_accessor, :oid klass.send :alias_method, :recno, :oid klass.send :alias_method, :recno=, :oid= - unless klass.properties.include? :recno - klass.property :recno, Fixnum - end - symbols = klass.properties.keys klass.module_eval %{ - def self.kb_create(#{symbols.join(', ')}) + def self.kb_create(recno, #{symbols.join(', ')}) obj = self.allocate obj.recno = recno #{ symbols.map { |s| "obj.#{s} = #{s}; "} } return obj end @@ -279,9 +275,11 @@ return fields end def eval_og_insert(klass) pk = klass.primary_key.symbol + props = klass.properties.values.dup + values = props.collect { |p| write_prop(p) }.join(',') if klass.schema_inheritance? props << Property.new(:symbol => :ogtype, :klass => String) values << ", '#{klass}'" end