"SELECT WHERE IN" equivalent

Hi,

I have two entities TMaster (master) and TDetail (detail) and I would like to retrieve the list of masters (TList<TMaster>) having detail (TDetail). I don't find neither Aurelius nor XData Client syntax to request entity list like:  

SELECT * FROM Master WHERE MasterID IN (
                                SELECT MasterID FROM Detail)

Any idea? Thank you.

Regards,

There is no such syntax, unfortunately. You should use SQL condition for that and add that criteria directly using SQL.

Hi Wagner,

Unfortunately, it does not work. I have the following error:
SQL error code=-104 Token unknown  IN

TXDataOperationContext.Current.GetManager.Find<TMaster>
                .Where(Linq.Sql('MasterD IN (SELECT MAsterID IN Detail )'));

I guess it should be "Select masterId from Detail", not "Select masterId In Detail"?

Of course, it's stupid! I was focused on the first IN of the query. 

It works fine. Thank you very much.