Hi I am trying to get Filters to work with a join clause and a from,
however it seams that when i add these to the HQL it seems to start ignoring the collection that i have use for the filter.
following tis the code i use to call the filter.
Code:
allCancelsNoRun = (IList) Persistor.getSession().Filter(this.TransactionSet,
@"SELECT COUNT(this),sum(this.Amount)
from Transaction
Join t.Rejects as rejects
WHERE this.id not in(
select
r.EFTTransaction.id
from
EFTReject r
Where r.errorCode = 0
) and (rejects.errorCode <> ? AND rejects.errorCode <> 5 AND rejects.errorCode <> 51)"
, 0, NHibernateUtil.Int32);
the above query works but it dosnt restrict the set to only those initially in TransactionSet.
I figure there is to ways that i should do this.
1. try and join against this, but i have had no luck getting this to work something like
Code:
from this t join t.Rejects as rejects
2. try and add into the where clause.
Code:
where t in this
also no luck with this.
looking forward to any insite you can give.
thanks
Jsutin