Hello there,
with the following Code i am trying to build a Criteria Query that should get me all the fitting attachmentHead Objects. Raw SQL should look Like this:
Code:
Select * from attachmentHeads Where maMailid = [arraycontent]
In my Project i tried something like this:
Code:
public IList getAttachmentHeads(IList mailsheads)
{
ICriteria crit = session.CreateCriteria(typeof(attachmentHead));
for (int i = 0; i < mailsheads.Count; i++ )
{
crit = crit.Add(Expression.Eq("maMailid", ((mailsHead)mailsheads[i].maMailid)));
}
return crit.List();
}
Instead of working properly it only returns an empty List.
What should I do?
Thx!