Skip to content
Browse files

make associations work again

  • Loading branch information...
1 parent 3231501 commit ffbf1fbd60ffbc2b86bb4acf0ae33e1af2af94f5 @douglasrodrigo douglasrodrigo committed Oct 3, 2011
Showing with 5 additions and 11 deletions.
  1. +5 −11 lib/dm-hibernate-adapter/hibernate.rb
View
16 lib/dm-hibernate-adapter/hibernate.rb
@@ -231,21 +231,15 @@ def to_java_class_name
def hibernate!
result = false
- relationships.each do |property, relationship|
- next unless relationship
-
- relationship.child_key
- relationship.parent_key
- relationship.through if relationship.respond_to?(:through)
- relationship.via if relationship.respond_to?(:via)
- end
unless mapped?
discriminator = nil
- # relationships.each do |rel|
- # end
-
+ relationships.each do |relationship|
+ relationship.source_key
+ relationship.target_key
+ end
+
properties.each do |prop|
discriminator = add_java_property(prop) || discriminator
end

1 comment on commit ffbf1fb

@mkristian
Owner

little change and it works again - cool :)

Please sign in to comment.
Something went wrong with that request. Please try again.