readme, changelog

This commit is contained in:
Kononnable 2018-06-17 21:30:54 +02:00
parent 9435f609f1
commit 9db678299e
3 changed files with 19 additions and 1 deletions

View File

@ -1,6 +1,6 @@
language: node_js
node_js:
#- stable
- stable
- 8
- 6
sudo: required

View File

@ -21,6 +21,9 @@ To install module globally simply type `npm i -g typeorm-model-generator` in you
### Npx way
Thanks to npx you can use npm modules without polluting global installs. So nothing to do here :)
>To use `npx` you need to use npm at version at least 5.2.0. Try updating your npm by `npm i -g npm`
### Database drivers
All database drivers except oracle are installed by default. To use typeorm-model-generator with oracle databese you need to install driver with `npm i oracledb` and configure [oracle install client](http://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html) on your machine.
## Usage
```shell
@ -53,6 +56,8 @@ Options:
--cp, --case-property Convert property names to specified case
[choices: "pascal", "camel", "none"] [default: "none"]
--lazy Generate lazy relations [boolean] [default: false]
--namingStrategy Use custom naming strategy
--relationIds Generate RelationId fields [boolean] [default: false]
--generateConstructor Generate constructor allowing partial initialization
[boolean] [default: false]
```
@ -85,3 +90,7 @@ Options:
```
npx typeorm-model-generator -d "Z:\sqlite.db" -e sqlite -o .
````
## Naming strategy
If you want to generate custom names for properties in generated entities you need to use custom naming strategy. You need to create your own version of [NamingStrategy](https://github.com/Kononnable/typeorm-model-generator/blob/master/src/NamingStrategy.ts) nad pass it as command parameter.
```typeorm-model-generator -d typeorm_mg --namingStrategy=./NamingStrategy -e sqlite -db /tmp/sqliteto.db```

9
changelog.md Normal file
View File

@ -0,0 +1,9 @@
# Changelog
## 0.2.17
* added support for relationId fields
* added support for custom naming entity fields
* removed oracledb from dependencies
* generating nullable column types for nullable columns