Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added set generation.

  • Loading branch information...
commit 299bb4f3c45398c8b340ee482b15c0cc8fc1071d 1 parent 8c0b8ac
@cpoirier authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/schemaform/adapters/generic_sql/wrappers/model.rb
View
11 lib/schemaform/adapters/generic_sql/wrappers/model.rb
@@ -283,19 +283,24 @@ def lay_out()
class CollectionType
+ def initialize( context, model )
+ super(context, model)
+ @member_type = wrap(@model.member_type)
+ end
+
def table()
@table ||= @adapter.define_linkable_table(context.table.name + context.name, context.table)
end
- def name()
- @name ||= @adapter.create_name()
+ def name()
+ @name ||= @model.naming_type? ? @adapter.create_name() : @adapter.create_internal_name("value")
end
end
class SetType
def lay_out()
- Schemaform.debug.dump("skipping set of #{@model.member_type.description} #{@model.path} #{table.name}.#{name}")
+ @member_type.lay_out()
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.