Hi,
For a project that we are developing we need a couple of things from
DataMapper that are currently not build-in.
# Multiple insert (and if possible update and delete) #
We edit a lot of collections due to the nature of our applications.
That requires us to add a lot of objects to onetomany and manytomany
associations. What we need is a what to do the following...
@bookmark = Bookmark.get(1)
@bookmarks.tags.all.destroy #remove all tags
params[:bookmark][:tags].split(',').each {|tag| @bookmarks.tags <<
Tag.get(tag) unless @bookmarks.tags.include(Tag.get(tag))} # add
defined tags
@bookmarks.save
Currently this causes a lot of queries because we maintain tags in the
bookmarks object and a second object called notification. And also add
the tags to that. We want this to be improved so that only 1 delete
and 1 multi-insert query is run.
# Through associations should be mutable #
Currently only manytomany assocations are mutable. We would like to do
the following
Class User
has n, :subscriptions
has n, :feeds, :through => :subscriptions
end
and then be able to do change the associations. The subscription model
only requires the join id's (and we can always fail muting the
assocation if datamapper doesn't know how to change it.
And we are also thinking of adding something like
Class User
has n, :subscriptions
has n, :feeds, :through => :subscriptions, :join_with => {:type =>
"feed"}
end
So that when creating the association automaticly the join_with
attributes are added to the join model as wel...
Just to be clear, we want to be able to change the association like it
works with the :through => resource model...
-----------
Please let me know if you are interested to persue this. We do have a
budget to get this into DataMapper but it needs to be done properly.
Last time we also wanted to let someone develop a tagging plugin but
that failed horribly.
Kind Regards,
Abdul
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---