We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue type:
[ ] question [ ] bug report [x] feature request [ ] documentation issue
Database system/driver:
[ ] cordova [ ] mongodb [ ] mssql [ ] mysql / mariadb [ ] oracle [x] postgres [ ] cockroachdb [ ] sqlite [ ] sqljs [ ] react-native [ ] expo
cordova
mongodb
mssql
mysql
mariadb
oracle
postgres
cockroachdb
sqlite
sqljs
react-native
expo
TypeORM version:
[ ] latest [ ] @next [x] ^0.2.14 (or put your version here)
latest
@next
^0.2.14
Steps to reproduce or a small repository showing the problem:
Hi, I'd like to be able to apply multiple ValueTransformers to a field:
import { ValueTransformer } from "typeorm"; export const lowercase: ValueTransformer = { to: (entityValue: string) => { return entityValue.toLocaleLowerCase() }, from: (databaseValue: string) => { return databaseValue } } export const encrypt: ValueTransformer = { to: (entityValue: string) => { return crypto.encrypt(entityValue) }, from: (databaseValue: string) => { return crypto.decrypt(databaseValue) } }
And use them like this:
@Column({ unique: true, transformer: [lowercase, encrypt] }) email: string;
Is it on the road map ? I'd be more than happy to do a PR if this sounds a good idea to you !😇
Thanks
The text was updated successfully, but these errors were encountered:
I made a POC for Postgres and 2 value transformers #4009
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Issue type:
[ ] question
[ ] bug report
[x] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[ ]
latest
[ ]
@next
[x]
^0.2.14
(or put your version here)Steps to reproduce or a small repository showing the problem:
Hi, I'd like to be able to apply multiple ValueTransformers to a field:
And use them like this:
Is it on the road map ?
I'd be more than happy to do a PR if this sounds a good idea to you !😇
Thanks
The text was updated successfully, but these errors were encountered: