You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
I've just started working with trying to create different repositories, and I haven't been able to get remixed models to inherit the repository, or change the repository from :default
I can specify a repository for the Ticket model, but TicketComments can not be changed from the methods I've tried. The expected behavior should be for remixed models to inherit the repository of the models remixed from, i.e. TicketComments should inherit the repository of Ticket, but this may be my opinion in this case and I can see where it might not always be the case.
I'm probably missing the obvious method, but going through several times from various directions resulted in no change.
The text was updated successfully, but these errors were encountered:
using enhance
DataMapper.repository(:newrepo) (no effect)
def self.default_repository_name; :newrepo; end (error for the generated model on automigrate: must have at least one property or many to one relationship to be valid)
def default_repository_name; :newrepo; end (no effect)
module RemixeeClassMethods (no effect)
end
in the module to be remixed itself (no effect)
I guess I'm still not 100% about how repository get manipulated, but the methods I've tried tried just get ignored for the remixed model, the same methods that will work for the model doing the remixing.
I'm not sure I'm missing something (probably), but if this is some functionality that is missing (repository always gets set to :default) there are a number places to think about where to put a method that handles setting the repository for the remixed model: RemixeeClassMethods, within enhance, within the remix method, but I'd just prefer it to be default behavior that gets that can be overridden, remixed models inherit the repository of the model doing the rmixing and if needed overwritten in the 'remix n, :remixables, :repository => :newrepo'
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've just started working with trying to create different repositories, and I haven't been able to get remixed models to inherit the repository, or change the repository from :default
Using this:
https://gist.github.com/1278627
I can specify a repository for the Ticket model, but TicketComments can not be changed from the methods I've tried. The expected behavior should be for remixed models to inherit the repository of the models remixed from, i.e. TicketComments should inherit the repository of Ticket, but this may be my opinion in this case and I can see where it might not always be the case.
I'm probably missing the obvious method, but going through several times from various directions resulted in no change.
The text was updated successfully, but these errors were encountered: