linq query translator problem?

Jan 23, 2009 at 7:12 AM

With a simple model like this:

<Class name="Page"  >
      <Property name="PageName" type="System.String" />
      <Property name="IsVisible" type="System.Boolean" />
</Class>
 <Class name="Site"  >
      <Property name="Name" type="System.String" />
</Class>
<Relationship type="">
      <Parent name="Page" multiplicity="*" role="" />
      <Child name="Site" multiplicity="1" role="Site" />
</Relationship>

the following linq query works well

from Page p in oc where p.Site.Id == sid  select p

but if I add another where parameter

from Page p in oc where p.Site.Id == sid & p.IsVisible == true select p

I have no results.

I think that underlying opath (and sql) query  is wrong

[exists(Site[id('e8d9620a-61cd-4f68-b32e-43feb134fb84')]) and id('e8d9620a-61cd-4f68-b32e-43feb134fb84') and IsVisible = true]

FROM [Site]   AS [e2]  INNER JOIN [Page]   AS [e1]  ON ([e1] .[FK_Site]  = [e2] .[SiteId]  ) WHERE ([e2] .[SiteId]   IN ('e8d9620a-61cd-4f68-b32e-43feb134fb84' ) )
And (([e0] .[FK_Site]  = [e1] .[FK_Site]  ) ) ) And [e0] .[PageId]   IN ('e8d9620a-61cd-4f68-b32e-43feb134fb84' ) ) And ([e0] .[IsVisible]  = 1 ) ) )

because the PageId constraint with a Site guid (e8d9620a-61cd-4f68-b32e-43feb134fb84)

A linq query translator problem?

Regards,

Giovanni Livi
                          

 





Coordinator
Jan 27, 2009 at 4:51 PM
I reminds me somtehing and I think this has been solved. Did you use the development subversion server or the codeplex release ?
I have created a work item for this bug and will check if we just need to publish a new release from the dev branch to solve the issue.

Regards,
Sébastien
Jan 27, 2009 at 9:11 PM

Currently I'm using svn version at 1584 revision

g.