diff --git a/box.json b/box.json index 95b3f3e..cb19aca 100644 --- a/box.json +++ b/box.json @@ -28,7 +28,7 @@ }, "type":"modules", "dependencies":{ - "qb":"^9.8.0", + "qb":"^10.0.1", "str":"^4.0.0", "mementifier":"^3.0.0" }, diff --git a/models/QuickBuilder.cfc b/models/QuickBuilder.cfc index b342a1c..e0d5b8b 100644 --- a/models/QuickBuilder.cfc +++ b/models/QuickBuilder.cfc @@ -135,7 +135,7 @@ component accessors="true" transientCache="false" { variables.qb.getColumns()[ 1 ] == "*" ) ) { - variables.qb.select( variables.qb.getFrom() & ".*" ); + variables.qb.select( variables.qb.getTableName() & ".*" ); } var subselectQuery = arguments.subselect; @@ -688,29 +688,6 @@ component accessors="true" transientCache="false" { return getEntity().mappingName(); } - /** - * Creates a new query using the same Grammar and QueryUtils. - * - * @return quick.models.QuickBuilder - */ - // public QuickBuilder function newQuery() { - // var builder = new quick.models.QuickBuilder( - // grammar = getGrammar(), - // utils = getUtils(), - // returnFormat = getReturnFormat(), - // paginationCollector = isNull( variables.paginationCollector ) ? javacast( "null", "" ) : variables.paginationCollector, - // defaultOptions = getDefaultOptions(), - // preventDuplicateJoins = getPreventDuplicateJoins() - // ); - // builder.setEntity( getEntity() ); - // builder.setFrom( getEntity().tableName() ); - // builder.setColumnFormatter( function( column ) { - // return builder.qualifyColumn( column ); - // } ); - // applyInheritanceJoins( builder ); - // return builder; - // } - function applyInheritanceJoins() { var entity = getEntity(); // Apply and append any inheritance joins/columns diff --git a/models/QuickQB.cfc b/models/QuickQB.cfc index 3c19894..ddee35c 100644 --- a/models/QuickQB.cfc +++ b/models/QuickQB.cfc @@ -925,7 +925,7 @@ component ); newBuilder.setQuickBuilder( getQuickBuilder() ); newBuilder.setEntity( getEntity() ); - newBuilder.setFrom( getFrom() ); + newBuilder.setTableName( getTableName() ); return newBuilder; } diff --git a/models/Relationships/HasManyDeep.cfc b/models/Relationships/HasManyDeep.cfc index 49ab12d..99c05b0 100644 --- a/models/Relationships/HasManyDeep.cfc +++ b/models/Relationships/HasManyDeep.cfc @@ -96,7 +96,7 @@ component public void function performJoin( any builder = variables.relationshipBuilder ) { var segments = arguments.builder .getQB() - .getFrom() + .getTableName() .split( "[Aa][Ss]" ); var alias = segments[ 2 ] ?: ""; @@ -212,7 +212,7 @@ component public array function getQualifiedForeignKeyNames( any builder = variables.relationshipBuilder ) { var segments = arguments.builder .getQB() - .getFrom() + .getTableName() .split( "[Aa][Ss]" ); var alias = segments[ 2 ] ?: ""; @@ -238,7 +238,7 @@ component public array function getQualifiedLocalKeys( any builder = variables.relationshipBuilder ) { var segments = arguments.builder .getQB() - .getFrom() + .getTableName() .split( "[Aa][Ss]" ); var alias = segments[ 2 ] ?: "";