-
Notifications
You must be signed in to change notification settings - Fork 568
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
belongsToMany incorrectly assumes idAttribute is a column name. #397
Comments
Yeah, this is incorrect. I'm going to actually provide support for camel casing the keys directly in the library in the upcoming minor version, but in the meantime I'll see if I can fix this one. Thanks for the test case. |
Nice, thanks. It seems that my problem is really specific to |
has this been fixed? I think it just bit me too. is there a workaround? |
I had a related issue with |
@peteut This is still broken in the current version. |
master...peteut:4b15b012707edb8c0c9250380a8ec73f3cef6c91 worked for me. Maybe this is not related? |
It may do, I can check if you like. Is there a reason why it hasn't been merged yet? |
I was too lazy and didn't create a test case and pull request. Sorry for that. On Monday, May 4, 2015 2:28 PM, Rhys van der Waerden notifications@github.com wrote: It may do, I can check if you like. Is there a reason why it hasn't been merged yet? |
Just wondering what the status of this is? #771 doesn't seem to have fixed it - not sure if it was meant to. Thanks! |
I had a look at it last night. It's fixable but will require a bit of a On Thu, 3 Sep 2015 8:14 am Ben Ockmore notifications@github.com wrote:
|
Current specification of belongsToMany has a bug. Its `otherKey` and `foreignKey` parameter description are mistakenly partially swapped. Many issues have come up because of this problem. eg. bookshelf#397, bookshelf#1031, bookshelf#1276
The project leadership of Bookshelf recently changed. In an effort to advance the project we close all issues older than one year. If you think this issue needs to be re-evaluated please post a comment on why this is still important and we will re-open it. We also started an open discussion about the future of Bookshelf.js here #1600. Feel free to drop by and give us your opinion. |
My column names are
snake_case
, but my attribute names arecamelCase
. My database's primary key isentity_id
, for instance, theaccounts
table has a primary key ofaccount_id
.The
belongsToMany
association is incorrectly using the camelizedidAttribute
to join the tables.The text was updated successfully, but these errors were encountered: