Ok I found a solution:
selectFirst(flatten(extract(products, on(Product.class).getElements())),
having(on(Element.class).getCode(), equalTo("mycode")));
This will first select and flatten all my elements in a unique collection, then filter it on the code property.
I'm not sure it's the best solution from performance point of view: it looks as if all the products and elements are flattened before a full scan is done. (my understanding of Lambdaj is too weak here to be sure)
I think the full java implementation is more efficient because it stop when the first code is matched.