Skip to content

Comments

Fix assumption that selfref table ID columns are always named "id"#129

Open
Namnodorel wants to merge 2 commits intoTouK:masterfrom
Namnodorel:m2o-selfreference-fixes
Open

Fix assumption that selfref table ID columns are always named "id"#129
Namnodorel wants to merge 2 commits intoTouK:masterfrom
Namnodorel:m2o-selfreference-fixes

Conversation

@Namnodorel
Copy link

This PR fixes a smaller naming issue that occurred when using M2O-Relations in a selfreference context.

While working on that, I also noticed that ManyToOne-Annotated lists do not currently get filled out by krush (see for example the children attribute in the Category example). This should be fixable by applying M2M selfreference logic (or something similar) to M2O relations as well, but I currently do not have a time to properly try that out.

@Namnodorel
Copy link
Author

The recent commit added another fix: If a table has selfref, the toEntity() function would assume that any reference to another table with selfref is to the table itself. This results in incompatible aliases being passed if a different kind of entity was being referenced.

@Namnodorel
Copy link
Author

@pjagielski Ping on this PR, I'd really appreciate getting to use this fix along with the other krush changes made since by just using the official krush release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant