fix(create,docs): Add ES2022 class fields compatibility for TypeORM entities
When TypeScript target is ES2022+, useDefineForClassFields defaults to true.
This causes class field initialization to run after the constructor,
overwriting values set by super(input) in TypeORM/Vendure entities.
Result: All entity fields become undefined, leading to "null value in column
violates not-null constraint" database errors.
Changes:
- Add useDefineForClassFields: false to CLI tsconfig template
- Add warning in database entity documentation about ES2022+ compatibility
References:
- https://www.typescriptlang.org/tsconfig/useDefineForClassFields.html
- https://github.com/microsoft/TypeScript/issues/48814
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>