typeorm-polymorphic icon indicating copy to clipboard operation
typeorm-polymorphic copied to clipboard

bugfix: query parent.constructor.name in entityType when type is parent

Open JasonJiang00 opened this issue 4 years ago • 2 comments

JasonJiang00 avatar Oct 15 '21 02:10 JasonJiang00

Hi, when I was using your library, I found that I couldn't get the children correctly while using the parent. I thought we should query the parent constructor name in entityType, so I submitted a change and hope to get a reply. Thank you for everything

@bashleigh

JasonJiang00 avatar Oct 15 '21 02:10 JasonJiang00

Hi @JasonJiang00 Thanks for the PR, however I think this change will likely break the query for others. Can you please provide me a snippet of how you're saving to the DB and the results in the DB? Just want to check the results. I do remember entity['prototye'].name and entity.constructor.name have different results and this is likely one of those conflicts

bashleigh avatar Oct 15 '21 08:10 bashleigh