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

Better support for objects that don't have a primary key called :id #3

Open
camsaul opened this issue Jan 31, 2017 · 2 comments
Open

Comments

@camsaul
Copy link
Member

camsaul commented Jan 31, 2017

I think we could add a method to IModel called primary-key or something like that that could be used to get field(s) that should be used as the primary key (default implementation would return :id). It could accept either a keyword (for a single-column key) or a sequence of keywords for multiple-column keys.

deanmarc25 added a commit to deanmarc25/toucan that referenced this issue Sep 12, 2017
…led :id

TODO:- Documentation
     - Look at styleguide
@deanmarc25
Copy link

@camsaul I found this project and decided to play with this issue. Was wondering if you could clarify your vision for having multiple column keys. I used a simple map for my test run but am willing to fit it into the interface you described above before I finish the rest of the code.

Right now you can override the id field and the existing API won't change or you can pass a hash map into invoke-model to select on multiple fields.

Thanks!

@camsaul
Copy link
Member Author

camsaul commented Jan 29, 2019

Implemented by #53

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

No branches or pull requests

2 participants