moleculerjs-boilerplate icon indicating copy to clipboard operation
moleculerjs-boilerplate copied to clipboard

typeorm relationships failed

Open Ellomend opened this issue 4 years ago • 3 comments

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 ?

Ellomend avatar Sep 02 '19 09:09 Ellomend

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.

issue-label-bot[bot] avatar Sep 02 '19 09:09 issue-label-bot[bot]

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.

omeraplak avatar Sep 03 '19 06:09 omeraplak

@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],

BatuhanW avatar Sep 06 '19 10:09 BatuhanW