This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have a question. I have a schema where: A test belongs to a Person. A person can have multiple PersonLocation. PersonLocation has attributes like StartDate, EndDate, Town I am filtering on Tests and I want to get all tests where its person's current location's town is wellington. In sql it would be something like this: SELECT * FROM TEST t JOIN PERSON p on t.personid = p.personId WHERE EXISTS(SELECT 1 FROM PersonLocation pl WHERE pl.PersonId = p.personId AND pl.StartDate >= DateTIme.now AND pl.EndDate <= DateTime.now AND Pl.Town == wellington) On linq using lightspeed, i was thinking of something like this: Uow.Query However this does not work. I vaguely remember that there was an issue with this that prevents it from working when you have more than one criteria. And it appears to be the case when i removed the StartDate/EndDate criteria and is left with the Town filter. Is this a known issue? How do I get around it? Thanks! |
|
|
No this query you have expressed above should be fine. We have made some fixes regarding Any/All queries recently so possibly you are running into something which was fixed there - are you running a recent nightly build?
|
|