Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Change primary key? #16

Closed
marcelklehr opened this Issue · 2 comments

2 participants

@marcelklehr

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?

@kmalakoff
Owner

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.

@marcelklehr

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
Something went wrong with that request. Please try again.