How do I filter objects stored inside other objects during a query?

Feb 24, 2014 at 12:14 AM
Edited Mar 1, 2014 at 11:42 PM
I am attempting to fetch objects of type "Item" from the database. However, there is another object "Recipe" stored in the database has a local variable of type "Item". When a query is done for Items, the one inside that recipe is also fetched. How can I filter objects located inside other objects (This is mainly to avoid duplicates)?