You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there is an issues with virtual attributes not working at all.
When loading an entity, quick will create a new instance of the entity then populate the data and return it. When it creates this new entity the virtual attributes are not persisted.
QuickBuilder.cfc
public any function loadEntity( required struct data ) {
....
return getEntity()
//this is the issue, the virtual attributes from the orginal entity are not persisted
.newEntity()
.assignAttributesData( arguments.data )
.assignOriginalAttributes( arguments.data )
.markLoaded();
....
}
function scopeAddTradeCount(qb){
qb.selectRaw(" (SELECT count(id) FROM trade WHERE trade.inventoryBatchId = inventory_batch.id) as tradeCount");
appendVirtualAttribute( "tradeCount" );
}
I believe there is an issues with virtual attributes not working at all.
When loading an entity, quick will create a new instance of the entity then populate the data and return it. When it creates this new entity the virtual attributes are not persisted.
quick/models/QuickBuilder.cfc
Line 1327 in 4ce7d6d
This is my work around for now
The text was updated successfully, but these errors were encountered: