mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
修复关联查询时whereTime找不到关联表前缀的BUG
Signed-off-by: Karson <karsonzhang@163.com>
This commit is contained in:
@@ -541,12 +541,18 @@ abstract class Builder
|
|||||||
* @param array $options 查询条件
|
* @param array $options 查询条件
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function parseJoin($join, $options = [])
|
protected function parseJoin($join, & $options = [])
|
||||||
{
|
{
|
||||||
$joinStr = '';
|
$joinStr = '';
|
||||||
if (!empty($join)) {
|
if (!empty($join)) {
|
||||||
foreach ($join as $item) {
|
foreach ($join as $item) {
|
||||||
list($table, $type, $on) = $item;
|
list($table, $type, $on) = $item;
|
||||||
|
if (is_array($table)) {
|
||||||
|
$origin = key($table);
|
||||||
|
if ($origin && $origin != $table[$origin]) {
|
||||||
|
$options['alias'][$origin] = $table[$origin];
|
||||||
|
}
|
||||||
|
}
|
||||||
$condition = [];
|
$condition = [];
|
||||||
foreach ((array) $on as $val) {
|
foreach ((array) $on as $val) {
|
||||||
if ($val instanceof Expression) {
|
if ($val instanceof Expression) {
|
||||||
|
|||||||
Reference in New Issue
Block a user