Fixed issue that was preventing ability to join one column multiple times.#23
Fixed issue that was preventing ability to join one column multiple times.#23arseniew wants to merge 3 commits intoLanKit:masterfrom
Conversation
Fixed issue that was preventing ability to join one column multiple times.
|
Interesting...what do you mean by joining the same table several times? Such like with Ticket below...? I'm hesitant to change the structure of the join name because if someone is using a filter callback with a join name it would probably break it and leave them wondering what happened. And I apologize on such a late comment on this. I just haven't had the time to really maintain this bundle lately. |
|
Hello, thank you for the reply. SELECT employees.firstName, department.value as department, position.value as position from employees
LEFT JOIN dictionary AS department ON employees.department_id = department.id
LEFT JOIN dictionary AS position ON employees.position_id = position.id;I can recreate such a join in Doctrine easily, however DatatablesBundle would merge these two join conditions into one, thats why i needed to differentiate them. But you are absolutely right, it would break backward compatibility when using callback. I didn't thought that through. Sorry for the confusion (That's my first pull request ... ever) If you think it would be helpful i could create similar solution, but:
P.S. |
Since joinName is generated using base entity and related entity in case of joining same table several times generated query was not correct. Prefixing joinName with field seems to fix this problem.