I am using subsonicproject and the activerecord pattern.

I have a database with three tables: Cities, Concerthalls, Concerts. Each Concerthall has a foreign-key relationship to a City. Each Concert has a foreign-key relationship to a Concerthall.

I would like to retrieve all concerts within a given city. So I need to get all the Concerthall-ids for a city and pass them to subsonicproject. In "normal" sql I would use the "where ... in"-statement, but how do I do it with subsonicproject?

I am thinking about something like (pseudocode): List concertHallsId=xxxxxxx; Concerts.Find(concert.ConcertHallId in concertHallIds);

thanks Thomas

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top