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
Sequelize map is empty
export class User extends Model { } User.init({ id: { type: DataTypes.INTEGER, autoIncrement: true, allowNull: false, primaryKey: true, validate: { isNumeric: true } }, username: { type: DataTypes.STRING, allowNull: false, validate: { len: [5, 20] } }, email: { type: DataTypes.STRING, allowNull: false, unique: true, validate: { isEmail: true } }, password: { type: DataTypes.STRING, allowNull: true, } }, { tableName: 'User', sequelize }); export class UserResponseDto { @AutoMap() username: string; @AutoMap() email: string; } export const mapper = createMapper({ strategyInitializer: sequelize(), }); createMap(mapper, UserEntity, UserResponseDto); const userResponse = await UserEntity.findByPk(1); console.log(mapper.map(userResponse .get(), User, UserResponseDto))
No response
npm i @automapper/core @automapper/classes @automapper/sequelize
{ username: 'MY-USER', email: 'my@mail.com' }
@automapper/core
@automapper/classes
@automapper/nestjs
@automapper/pojos
@automapper/mikro
@automapper/sequelize
8.7.7
Node: v18.14.0
"@automapper/classes": "^8.7.7", "@automapper/core": "^8.7.7", "@automapper/sequelize": "^8.7.7", "bcrypt": "^5.1.0", "body-parser": "^1.20.1", "cors": "^2.8.5", "dotenv": "^16.0.3", "express": "^4.18.2", "helmet": "^6.0.1", "joi": "^17.7.0", "mariadb": "^3.0.2", "morgan": "^1.10.0", "multer": "^1.4.5-lts.1", "reflect-metadata": "^0.1.13", "sequelize": "^6.28.0"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing issue for this?
Describe the issue
Sequelize map is empty
Models/DTOs/VMs
Mapping configuration
No response
Steps to reproduce
npm i @automapper/core @automapper/classes @automapper/sequelize
Expected behavior
Screenshots
No response
Minimum reproduction code
No response
Package
@automapper/core
@automapper/classes
@automapper/nestjs
@automapper/pojos
@automapper/mikro
@automapper/sequelize
Other package and its version
No response
AutoMapper version
8.7.7
Additional context
Node: v18.14.0
The text was updated successfully, but these errors were encountered: