last day (15 days later) » 

4:36 PM
my native language is spanish, but i try to explain the most clear i can
 
Hi
 
i m here
i have a project in a repository
 
checking
 
the repository contain the database to
model dir event-tech-day/src/models/
 
what is the problem?
 
4:47 PM
I'm not doing it with classes because when I try to recover the data with the findall method or another method, it returns an empty object to me {}
@Chev the models are not related
I was investigating and some mention that it is the transpilator, babel
If possible, show me the complete project of the model you answered in the question
 
this is mysql db?
mariadb i see
unfortunately, I cannot share my complete project
I don't see authenticate() being called on sequelize in the connection - is that not needed?
you should see the relevant SQL statements outputted to the console in your express app
may not be the case for mariadb, but in postgres I needt to do:
sequelize = new Sequelize('db', 'user', 'password', {
host: '0.0.0.0',
port: '5432',
dialect: 'postgres',
logging: true
});

await sequelize.authenticate();
 
 
2 hours later…
6:32 PM
let me try
is a basic project for a course jeje
@Chev is mariaDB but work in mysql too
all work, create, select, update, delete but the asossiation not work
 
6:54 PM
i solve it! only add this on findAll include: {
model: speakersModel,
attributes: ['name', 'email'],
where: {
speakerId: Sequelize
.col('speakers.id')
}
}
Thanks for your time
 
@AlbertHidalgo no prob, best of luck with the rest
 

last day (15 days later) »