views:

236

answers:

1

Anyone know how to convert an ICriteria into a DetachedCriteria. I need to use an existing ICriteria as part of a subquery using:

.Add(Subqueries.PropertyIn("Name", myDetachedCriteriaSubquery))

Is there any way to convert an ICriteria to a DetachedCriteria. I will accept 'no' with a credible reference.

A: 

DetachedCriteria has a constructor which takes an ICriteria but it is internal. It is used by CriteriaTransformer. Perhaps you could implement something similar?

mattk