vwhope / Cryptofolio

a cryptocurrency portfolio management application to track your favorite coins like bitcoin, ethereum, etc.
MIT License
4 stars 3 forks source link

unable to select exact fields when using Sequlized findOne query #30

Closed vwhope closed 5 years ago

vwhope commented 5 years ago

The query returns all fields from all associated files. Instead, we just want to select specific fields from each associated file.

vwhope commented 5 years ago

While trying to setup up queries to show data in the Portfolio section, Alton was not able to get the results he wanted using prepared Sequelize queries. Vicki found raw query options for Sequelize that can be customized instead of using prepared sql queries. This solved the issue.

http://docs.sequelizejs.com/manual/tutorial/raw-queries.html

vwhope commented 5 years ago

Turns out it didn't solve the issue - instead returned to initial prepared Sequelize query and then state which fields from each table using attributes property.