Skip to content

Conversation

@SuzGori
Copy link

@SuzGori SuzGori commented Jul 14, 2023

#17

@SuzGori SuzGori changed the title fix: Fix this error: Type 'T' does not satisfy the constraint 'ObjectLiteralL' fix: Fix this error: Type 'T' does not satisfy the constraint 'ObjectLiteral' Jul 14, 2023
}

export class TypeOrmCrudService<T> extends CrudService<T, DeepPartial<T>> {
export class TypeOrmCrudService<T extends ObjectLiteral> extends CrudService<T, DeepPartial<T>> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's for TypeORM why not extend from BaseEntity?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonydspaniard BaseEntity is not a good candidate for this extend as it is only applicable when using the ActiveRecord pattern and plenty of people use the DataMapper.

See https://typeorm.io/active-record-data-mapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants