pankod / moleculerjs-boilerplate

A well-structured Moleculer JS Boilerplate with Typescript, CLI, Service Helpers, Swagger, Jest support and everything you'll ever need to deploy rock solid projects. https://pankod.github.io/moleculerjs-boilerplate/
MIT License
196 stars 36 forks source link

typeorm relationships failed #52

Open Ellomend opened 5 years ago

Ellomend commented 5 years ago

First of all great project. i love the idea. however relationships with typeorm failing =(

    @OneToMany(type => Step, step => step.checklist)
    steps?: Step[];
    @ManyToOne(type => Checklist, checklist => checklist.steps)
    checklist?: Checklist;
Connection error! Error: Entity metadata for Checklist#steps was not found.

Is it me or typeorm really brittle and fragile ?

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.63. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

omeraplak commented 5 years ago

Hi @Ellomend , Thanks for reaching us. We’re gonna investigate it. And we’ll update it soon. Feel free to contact us if you need anything.

BatuhanW commented 5 years ago

@Ellomend Can you provide more details? An example repo or more detailed code could work.

However, my guess is, somehow entities are failed loading.

Can you import your entities one by one and pass it here; https://github.com/pankod/moleculerjs-boilerplate/blob/master/src/Entities/Connection.ts#L11

import { CheckList, Step} from '@Entities'

entities: [Checklist, Step],