Sorry for this newbie question ;-)
But I didn't found a good solution in the mailings.
My problem:
I can't remove existing associations / relations between classes.
<code>
class Project
#~ #PDMS projects
include DataMapper::Resource
property :code, String, :key => true, :length => 3, :required => true
#...
has n, :wuser, :through => Resource
end
class Wuser
#~ #Windows user (login name)
include DataMapper::Resource
property :login, String, :key => true, :required => true
#...
has n, :project, :through => Resource
end
</code>
If I try to delete a relationship with:
<code>
p = Project.first(:code => 'AAC')
p.wuser.first(:login => 'mcpl').destroy
</code>
My ressource (Wuser 'mcpl') will be deleted.
Where is my mistake or how can I delete one association ?
Thanks before for your answers and help !!!
--
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.