GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I'd like to be able to change the type of the primary key (changing the field name would be nice to have, too), can I simply override it in my schema definition?
Quick background question: are you asking about backbone-sql? I spoke with @gwilymhumphreys and he mentioned that he's using a Knex function to create the primary key.
As for changing the name of the primary key, we have been using 'id' everywhere and ignoring Backbone's idAttribute attribute so this would be a big change (in backbone-mongo, we automatically map _id to id to reduce mental burden of supporting different primary keys). I'd recommend opening a separate issue and/or a pull request to explain your need and urgency of the fix.
ah, well.. I guess my model is just too crazy.. will think of a more straightforward solution :)