Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
Strap model object property is empty, but debugging the entire object shows many properties

So I have a strapi cron job, and this is part of it:

const entity = await strapi
  .query("registration")
  .model.query((qb) => {
    qb.where("created_at", ">", emailSendDate);
  })
  .fetch();

strapi.log.debug("entity", entity);
strapi.log.debug("entity type", typeof entity);
strapi.log.debug("entity email", entity["email"]);
strapi.log.debug("entity email", entity.email);

And then I get this response:

[2021-10-05T03:49:01.012Z] debug entity {"id":98,"email":"example_email@domain.com" ...
[2021-10-05T03:49:01.012Z] debug entity type object
[2021-10-05T03:49:01.012Z] debug entity email undefined
[2021-10-05T03:49:01.012Z] debug entity email undefined

Maybe I am not understanding something here, but shouldn't this be a plain Javascript object? Why am I getting undefined when trying to access the properties?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda