Change primary key? #16

Closed
marcelklehr opened this Issue Feb 28, 2014 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

marcelklehr commented Feb 28, 2014

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?

Owner

kmalakoff commented Feb 28, 2014

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.

Contributor

marcelklehr commented Feb 28, 2014

ah, well.. I guess my model is just too crazy.. will think of a more straightforward solution :)

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