dchester / epilogue

Create flexible REST endpoints and controllers from Sequelize models in your Express app
846 stars 116 forks source link

Is epilogue supposed to work with strings as ids? #118

Closed philotas closed 8 years ago

philotas commented 8 years ago

When I declare a string as my id column (primaryKey: true) then I cannot GET /resources/sss

I get en error:

Unhandled rejection SequelizeDatabaseError: SQLITE_ERROR: no such column: NaN

You are obviously always expecting a number?

Is there a reason for this limitation? Or is this a bug ?

mbroadst commented 8 years ago

Hm, I don't see anything that would prevent you from using a string id. Can you show me more of your setup (model as well as resource definitions)?

To be more specific: I think it's actually your Sequelize model that may be incorrectly defined in this case, but I'd need to see more to make that determination.