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
The documentation states that your ActiveRecord model should implement a class method "sets":
# A model class is expected to provide a method Model.sets that
# returns all the sets the model supports. See the
# activerecord_provider tests for an example.
However, the find method basically composes a query condition that, if the OAI request contains a "set" parameter, looks like:
AND set = '<set_name>'
So it is assuming your ActiveRecord model has an attribute (and hence a database column) "set".
Is this what we want? This amounts to per-record granularity- you need to have the "set" value set per record that you want returned. Conceptually I think of a model as being a set, and hence all it's record belong.
I think we should remove this. I'm happy to supply a pull request if no one has an argument in favour of keeping it.
The text was updated successfully, but these errors were encountered:
It shouldn't be too hard to check if the results returned by model.sets are ActiveRecord models, use reflection to find the association back to model (eg. set.records) and then use it to perform find.
ActiveRecordWrapper is a wrapper for model.
The documentation states that your ActiveRecord model should implement a class method "sets":
However, the find method basically composes a query condition that, if the OAI request contains a "set" parameter, looks like:
So it is assuming your ActiveRecord model has an attribute (and hence a database column) "set".
Is this what we want? This amounts to per-record granularity- you need to have the "set" value set per record that you want returned. Conceptually I think of a model as being a set, and hence all it's record belong.
I think we should remove this. I'm happy to supply a pull request if no one has an argument in favour of keeping it.
The text was updated successfully, but these errors were encountered: