I have the following proprty
<property name="Allocated" type="decimal" formula="(select sum(a.AllocationAmount) from Allocation a where a.TransactionId = TransactionId)" />
This loads the amount of a Transaction that has been allocated to invoices which is working beautifully.
However, is most cases I don't care about this amount. Is there a way to conditionally load this calculated column? Or is there a way to add this calculated column to HQL/Critera so I can just make it part of some specific queries that I run?