Intenta agregar v_occupation
directamente en la cadena de consulta en lugar de usar reemplazos. Puede insertarlo usando +
para agregar las cadenas o usar Template String
para insertar valores utilizando marcadores de posición en cadenas entre comillas graves.
const queryToUpdateExistingTable = `
INSERT INTO social_profile
(
fk_user_id,
fk_marital_status_id,
fk_military_service_id,
v_occupation,
fk_education_id,
v_bio,
v_pets,
v_places_lived
)
VALUES
(
:fk_user_id,
:fk_marital_status_id,
:fk_military_service_id,
${uProfileData.v_occupation},
:fk_education_id,
:v_bio,
:v_pets,
:v_places_lived
)`
return queryInterface.sequelize.query(queryToUpdateExistingTable, {
type: queryInterface.sequelize.QueryTypes.INSERT,
replacements: {
fk_user_id: uProfileData.id,
fk_marital_status_id: uProfileData.fk_marital_status_id,
fk_military_service_id: uProfileData.fk_military_service_id,
fk_education_id: uProfileData.fk_education_id,
v_bio: uProfileData.v_bio,
v_pets: uProfileData.v_pets,
v_places_lived: uProfileData.v_places_lived
}
})