Hmm. Then you'll need to use a subquery.
Code:
DetachedCriteria uiCrit = DetachedCriteria.forClass(UserItem.class, "ui");
uiCrit.add(Restrictions.eq("ui.User", userWithId1));
Criteria crit = session.createCriteria(Item.class);
crit.add(Subqueries.in("id", uiCrit));
I'm not sure that that's going to work, though: usually ids and properties are treated differently (have a look at Restrictions.idEq), so Subqueries.in mightn't accept "id" as a valid property. If that's the case, you'll have to map UserItem.userId and UserItem.itemId as normal properties, just to get Subqueries.in to work. To map those columns twice (remember, the columns are in the many-to-one associations) use <property name="userId" formula="userId"/>, not column="userId".
That'd be icky, I hope you don't have to do that.