lib/rails/generators/neo4j/model/templates/model.erb in neo4j-5.2.7 vs lib/rails/generators/neo4j/model/templates/model.erb in neo4j-5.2.8
- old
+ new
@@ -1,9 +1,14 @@
class <%= class_name %> <%= parent? ? "#{options[:parent].classify}" : "" %>
include Neo4j::ActiveNode
-<% attributes.each do |attribute| -%>
+<% attributes.reject(&:reference?).each do |attribute| -%>
property :<%= attribute.name %><%= ", type: #{attribute.type_class}" unless attribute.type_class == 'any' %><%= "\n " + index_fragment if index_fragment = index_fragment(attribute.name) %>
<% end -%>
+
+<% attributes.select(&:reference?).each do |attribute| -%>
+ has_one :in_or_out_or_both, :<%= attribute.name %>, type: :FILL_IN_RELATIONSHIP_TYPE_HERE
+<% end -%>
+
<%= has_many_statements if has_many? -%>
<%= has_one_statements if has_one? -%>
<%= timestamp_statements if timestamps? -%>
end