Comments (4)
with the latest version you can do:
Model#loadAssociatedData(callback)
The model instance will then have all association data in Model#associatedData. Check out the loadassociateddata example.
Please let me know if that fixed the issue.
BTW: the repo is now working again
from sequelize.
I'm thinking about the way to access the associated data... foo.associatedData.bar seems a little bit odd to me... What do think about that: When calling the getBla() method the result will be saved in the associatedData hash. Calling the method again will return the stored data without calling the database again. Calling the method with a force-param will call the database.
Same with the loadAssociatedData method... calling it will store all the associated data in the associatedData hash and calling a get* method will just return the content of the associatedData hash
from sequelize.
my latest commit added an option for loading the association when calling find or findAll. checkout the example http://github.com/sdepold/sequelize/blob/master/examples/LoadAssociatedData/app.js
from sequelize.
i fixed that issue in 0.4.3
from sequelize.
Related Issues (20)
- sequelize reference error relation not defined HOT 2
- There is a problem with the handling of the bigint HOT 1
- settings raw as true in sqlite returns JSON as String HOT 2
- DeprecationWarning: The URL `sqlite://:memory:` is invalid HOT 3
- Increment or Decrement value using Sequelize upsert() does not work in postgre HOT 1
- Incorrect types for default in findOrCreate and findOrBuild HOT 2
- Support Automatic Transaction Nesting When Using `cls-hooked` HOT 2
- UPDATE database ignoring case of data objects HOT 1
- onUpdate option in association not working
- `sequelize.query` doesn't accept `Literal` HOT 2
- UpdateOptions is missing plain property
- Publish latest alpha to NPM alpha tag, including Postgres connectionTimeoutMillis HOT 3
- Special method/mixin "add" for BelongsToMany association overrides record instead of creating a new one
- SequelizeConnectionAcquireTimeoutError: Operation timeout HOT 3
- Regression between 6.35.1 and 6.35.2 - query stopped working. HOT 3
- Design Change Request: MS SQL UUID Type - `uniqueidentifier` not `char(36)` HOT 1
- I wish to optimize the method of findAll HOT 1
- sequelize.sync() does not create schemas HOT 1
- update操作
- update操作
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sequelize.