mardi 7 mars 2017

Can sequelize association functions be camelcase when the association id is underscored?

I have a user_profile table in my database and it's related to a photo table. Unfortunately, when using an auto-generated association function from photo to find a user_profile, the function is named getUser_profile(). Is there any way in which the function could be getUserProfile while the id on the object is still called user_profile_id? I find the underscore to be really ugly and inconsistent with how functions are generally named.

I'm not overly fond of switching to camelcase for column names because the front-end is already using hyphenated column names to make its use easier when working with Ember and that would leave my team and me with three different sets of casings to deal with, and I'm not sure how well that would turn out.

Any thoughts or suggestions are welcome!!




Aucun commentaire:

Enregistrer un commentaire