Jacques,

Have a look at http://pastie.org/628860
Is this what you would expect?

cheers
snusnu

On Thu, Sep 24, 2009 at 14:17, Jacques Crocker <[email protected]> wrote:
>
> Hi. I'm seeing an error in my "has n through" relationship when
> migrating from dm-core 0.9.10 to 0.10. Please let me know if I'm
> writing the syntax wrong.
>
> Here's the model:
>
>  class User
>    include DataMapper::Resource
>    property :id, Serial
>    has n, :group_memberships
>    has n, :groups, :through => :group_memberships, :model =>
> "Group", :via => :group, :parent_key => [:id], :child_key =>
> [:user_id]
>  end
>
> It produces this error when I use User.auto_migrate!
>
>  NoMethodError: undefined method ‘name’ for nil:NilClass
>  method initialize     in property_set.rb at line 169
>
>
> Here's a couple scripts that should easily allow you to reproduce the
> error:
>
> This script works in 0.9.10:
> http://gist.github.com/192686
>
> This same script breaks in 0.10.0:
> http://gist.github.com/192682
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to