JugglingDB Associations : display and cascade deleting

145 Views Asked by At

I am using compoundJs framework for Node.js.

CompoundJs uses the ORM JugglingDB which allows associations, for exemple there is Users who have many Devices :

User.hasMany(Device,   {as: 'devices',  foreignKey: 'UserId'});

I wish that when I delete a user, his devices are also deleted. Same when I show a user, I would see his devices.

Does JugglingDB provides that ?

0

There are 0 best solutions below