dieselpoint / norm

Access a database in one line of code.
Other
205 stars 36 forks source link

Fix: StandardSqlMaker and MySqlMaker ignore table argument in Query #75

Closed czm23333 closed 2 years ago

czm23333 commented 2 years ago

Same as #74, but with minimum change.

ccleve commented 2 years ago

Ok, this isn't a bad approach. I do something similar in getSelectSql():

    // unlike insert and update, this needs to be done dynamically
    // and can't be precalculated because of the where and order by

    StandardPojoInfo pojoInfo = getPojoInfo(rowClass);
    String columns = pojoInfo.selectColumns;

    String where = query.getWhere();
    String table = query.getTable();
    if (table == null) {
        table = pojoInfo.table;
    }

Merged.