{"comment":{"created_at":"2011-10-17T13:34:57Z","body":"Kristian, so many specs broken????\r\n\r\nWe can create a integration test environment of the adapter running dm specs in the cloudbees.","updated_at":"2011-10-17T13:34:57Z","url":"https://api.github.com/repos/mkristian/dm-hibernate-adapter/issues/comments/2428798","id":2428798,"user":{"gravatar_id":"20ad5b1eefb6037696cfcde5c0f2f0c9","avatar_url":"https://secure.gravatar.com/avatar/20ad5b1eefb6037696cfcde5c0f2f0c9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/douglasrodrigo","id":49929,"login":"douglasrodrigo"}},"action":"created","issue":{"number":18,"created_at":"2011-10-04T02:44:58Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Executing adapter spec I got a error, but creating the same Friend resource on the irb I got things working:\r\n\r\nexecuting with irb:\r\n\r\nsystem :005 > Friend.first.creator\r\nFriend.first.creator\r\nHibernate: \r\n    select\r\n        this_.id as id2_0_,\r\n        this_.creator_id as creator2_2_0_,\r\n        this_.name as name2_0_ \r\n    from\r\n        friends this_ \r\n    where\r\n        (\r\n            this_.id=?\r\n        ) limit ?\r\n\r\n => #<Friend @id=1 @name=\"god\" @creator_id=1> \r\n\r\n\r\n\r\nAdapter spec:\r\n\r\n[INFO] 1)\r\n[INFO] NativeException in 'DataMapper::Adapters::HibernateAdapter self referecing and direct sql should create a self referencing enitity'\r\n[INFO] org.hibernate.PropertyAccessException: Exception occurred inside setter of rubyobj.Friend.creator_id\r\n[INFO] org/hibernate/property/BasicPropertyAccessor.java:89:in `set'\r\n[INFO] org/hibernate/tuple/entity/AbstractEntityTuplizer.java:352:in `setPropertyValues'\r\n[INFO] org/hibernate/tuple/entity/PojoEntityTuplizer.java:232:in `setPropertyValues'\r\n[INFO] org/hibernate/persister/entity/AbstractEntityPersister.java:3580:in `setPropertyValues'\r\n[INFO] org/hibernate/engine/TwoPhaseLoad.java:152:in `initializeEntity'\r\n[INFO] org/hibernate/loader/Loader.java:877:in `initializeEntitiesAndCollections'\r\n[INFO] org/hibernate/loader/Loader.java:752:in `doQuery'\r\n[INFO] org/hibernate/loader/Loader.java:259:in `doQueryAndInitializeNonLazyCollections'\r\n[INFO] org/hibernate/loader/Loader.java:2232:in `doList'\r\n[INFO] org/hibernate/loader/Loader.java:2129:in `listIgnoreQueryCache'\r\n[INFO] org/hibernate/loader/Loader.java:2124:in `list'\r\n[INFO] org/hibernate/loader/criteria/CriteriaLoader.java:118:in `list'\r\n[INFO] org/hibernate/impl/SessionImpl.java:1597:in `list'\r\n[INFO] org/hibernate/impl/CriteriaImpl.java:306:in `list'\r\n[INFO] org/hibernate/property/BasicPropertyAccessor.java:89:in `set'\r\n[INFO] org/hibernate/tuple/entity/AbstractEntityTuplizer.java:352:in `setPropertyValues'\r\n[INFO] org/hibernate/tuple/entity/PojoEntityTuplizer.java:232:in `setPropertyValues'\r\n[INFO] org/hibernate/persister/entity/AbstractEntityPersister.java:3580:in `setPropertyValues'\r\n[INFO] org/hibernate/engine/TwoPhaseLoad.java:152:in `initializeEntity'\r\n[INFO] org/hibernate/loader/Loader.java:877:in `initializeEntitiesAndCollections'\r\n[INFO] org/hibernate/loader/Loader.java:752:in `doQuery'\r\n[INFO] org/hibernate/loader/Loader.java:259:in `doQueryAndInitializeNonLazyCollections'\r\n[INFO] org/hibernate/loader/Loader.java:2232:in `doList'\r\n[INFO] org/hibernate/loader/Loader.java:2129:in `listIgnoreQueryCache'\r\n[INFO] org/hibernate/loader/Loader.java:2124:in `list'\r\n[INFO] org/hibernate/loader/criteria/CriteriaLoader.java:118:in `list'\r\n[INFO] org/hibernate/impl/SessionImpl.java:1597:in `list'\r\n[INFO] org/hibernate/impl/CriteriaImpl.java:306:in `list'\r\n[INFO] /home/douglas/projetos/jibernate-dm/lib/dm-hibernate-adapter.rb:176:in `read'\r\n\r\n","comments":12,"title":"spec: self referecing and direct sql","updated_at":"2011-10-17T13:34:58Z","url":"https://api.github.com/repos/mkristian/dm-hibernate-adapter/issues/18","id":1809856,"assignee":null,"milestone":null,"closed_at":"2011-10-16T21:53:05Z","user":{"gravatar_id":"20ad5b1eefb6037696cfcde5c0f2f0c9","avatar_url":"https://secure.gravatar.com/avatar/20ad5b1eefb6037696cfcde5c0f2f0c9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/douglasrodrigo","id":49929,"login":"douglasrodrigo"},"html_url":"https://github.com/mkristian/dm-hibernate-adapter/issues/18","labels":[],"state":"closed"},"legacy":{"issue_id":1809856,"comment_id":2428798}}