Skip to content

The implementation in the readme is wrong.  #25

@codeninja

Description

@codeninja

Or at least, I was having problems with it.

I could not use the extended repository without invoking getCustomRepository instead of the standard getRepository as stated in the readme.

@Entity()
export class Address implements PolymorphicChildInterface {
....
}

@EntityRepository(Address)
export class AddressRepository extends AbstractPolymorphicRepository<Address> {}
import { Address, AddressRepository } from '../';
let addressRepository: AbstractPolymorphicRepository<Address>;

addressRepository = await TestConnection.connection.getCustomRepository(AddressRepository);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions