Allows use of [Node-ORM2](https://github.com/dresende/node-orm2) to talk to your relational database.
npm install denali-node-orm2Allows use of Node-ORM2 to talk to your relational database.
1. Install this package (denali install denali-node-orm2)
2. Change your ormAdapter key in /config/environment.js to node-orm2
3. Make sure your models (if any) have their attributes defined with the attributes that this adapter defines.
- text
- number
- boolean
- json
- date
Node-ORM2 supports additional types (visible here)
and can support additional types that match your DB of choice.
``
export default class Issue extends Model {
static createdAt = attr('date'); // maps to the issue, created_at column
}
`
Table names will shift to being pluralized shortly by default but we'd also like
both the table name and column naming approach to be configurable in the future to
support databases already in use.
If you are using the sqlite driver and see a Connection lost - driver does not support reconnection error, double-check
the path to your DB. This message can be thrown if the database is not found ...
1. Clone the repo down
2. npm installdenali server
3.
4. Hit localhost:3000
`sh``
$ denali test