Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data source refactoring #32

Open
danschultz opened this issue Mar 27, 2013 · 0 comments
Open

Data source refactoring #32

danschultz opened this issue Mar 27, 2013 · 0 comments

Comments

@danschultz
Copy link
Owner

Some things that can be cleaned up to make using data sources easier.

Required methods

Here's a list of methods that the data source needs to create, retrieve, update and delete data on the server.

  • find(id:int, request:LoadRequest):void
  • findHasMany(record:Record, association:HasManyAssociation, request:LoadRequest):void
  • create(data:Object, request:SaveRequest):void
  • delete(data:Object, request:SaveRequest):void
  • update(data:Object, request:SaveRequest):void

HasMany Requests

By default, has-many requests will be try to find a method on the adaptor that matches this pattern: find[AssociationName]. For instance, if we have a TwitterUser record with a has-many association named tweets, findHasMany will try to find a method on the adaptor called findTweets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant