danmurphy
05/05/2022, 8:16 PMreturnType
specified in our qb ColdBox.cfc to return a collection, but it just keeps returning an array of structs. So later on down the road the pluck method is failing when the results from qb are used.
Am I missing something? Config and stuff in the thread.danmurphy
05/05/2022, 8:18 PM'qb' : {
'defaultGrammar' : 'OracleGrammar@qb',
"returnFormat": function( q ) {
return application.wirebox.getInstance(
"name" = "Collection",
"initArguments" = { "collection": q }
);
}
},
And the DAO is doing a wirebox.getInstance( 'QueryBuilder@qb' )
and then eventually a .get()
. Any ideas why it is coming back as an array of structs instead of a collection?danmurphy
05/05/2022, 8:24 PM.setReturnFormat( function( q ) {
return application.wirebox.getInstance(
"name" = "Collection",
"initArguments" = { "collection": q }
);
} )
elpete
05/05/2022, 11:49 PMnewCollection
method on the entity to return your custom collection.elpete
05/05/2022, 11:50 PMdanmurphy
05/06/2022, 12:10 AMsetReturnFormat
to every QueryBuilder that returns something. Hmm.elpete
05/06/2022, 12:11 AMdanmurphy
05/06/2022, 12:14 AM