Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load embedded entities #138

Closed
Diluka opened this issue Jul 1, 2019 · 3 comments · Fixed by #267
Closed

Cannot load embedded entities #138

Diluka opened this issue Jul 1, 2019 · 3 comments · Fixed by #267

Comments

@Diluka
Copy link
Contributor

Diluka commented Jul 1, 2019

If there is an entity whose property is an embedded entity, then this property cannot be loaded due to a naming issue.

SELECT `Player`.`id`           AS `Player_id`,
        # other fields
       `Player`.`utmSource`    AS `Player_utmSource`, # this is manually add by `builder.addSelect(this['alias'] + '.utm.source');` only this is working
       `Player`.`utmSource`,
       `Player`.`utmMedium`,
       `Player`.`utmCampaign`,
       `Player`.`utmContent`,
       `Player`.`utmTerm`
FROM `pegasus_h5_player` `Player`
LIMIT 1

all columns are using default naming strategy.

BTW, TypeOrmCrudService.alias's access modifier shall be protected

@michaelyali
Copy link
Member

@Diluka
Copy link
Contributor Author

Diluka commented Jul 2, 2019

typeorm/typeorm#4047
There are still some problems with it, and it can be postponed. This will also involve queries and other situations.

@LisaMabley
Copy link

Is anything happening with this? About to refactor some stuff but I thought it was worth checking ...

frco9 added a commit to frco9/crud that referenced this issue Sep 19, 2019
frco9 added a commit to frco9/crud that referenced this issue Sep 25, 2019
michaelyali added a commit that referenced this issue Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants