krush
krush copied to clipboard
Fix assumption that selfref table ID columns are always named "id"
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.
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.
@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.