<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : How to do equivalent of left join</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : How to do equivalent of left join</description>
  <pubDate>Fri, 12 Jun 2026 01:28:36 -700</pubDate>
  <lastBuildDate>Mon, 16 Jul 2007 15:57:55 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=308</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>How to do equivalent of left join : Actually I had tried spans of...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=701#701</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 308<br /><strong>Posted:</strong> 16-Jul-2007 at 3:57pm<br /><br /><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Actually I had tried spans of that kind but always got an “Entity Relations do not connect” message. Going through the tutorial, I see why. I wasn’t connecting the object graph correctly. Thanks for all your help</SPAN>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 15:57:55 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=701#701</guid>
  </item> 
  <item>
   <title>How to do equivalent of left join : To define a span to an Entity...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=700#700</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=21" rel="nofollow">IdeaBlade</a><br /><strong>Subject:</strong> 308<br /><strong>Posted:</strong> 16-Jul-2007 at 3:57pm<br /><br /><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face=Arial size=2><SPAN =313440101-08062007>To define a span to an Entity type that is more than one level below the entity you are querying, add successive EntityRelations parameters to the AddSpan call.</SPAN></FONT><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007></SPAN></FONT>&nbsp;</DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007>Here is an example from our IdeaBladeTutorial database of defining a span from the Employee entity class to the Supplier Entity class:</SPAN></FONT></DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007></SPAN></FONT>&nbsp;</DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007>&nbsp;&nbsp;&nbsp;&nbsp; aEmployeeSpanQuery = new IdeaBlade.Persistence.EntityQuery(typeof(Employee));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aEmployeeSpanQuery.AddSpan(EntityRelations.Employee_Order,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityRelations.Order_OrderDetail,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityRelations.Product_OrderDetail,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityRelations.Supplier_Product);</SPAN></FONT></DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007></SPAN></FONT>&nbsp;</DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007>This example is taken from the tutorial "Supporting Disconnected Users" in the Fundamentals section of the Tutorials.&nbsp; If you open the completed solution, and then open the EmployeeForm.cs file in Code View, and look in the region "Connect/Disconnect", this code is found in the GetEmployeeGraphs method.&nbsp; This method shows several spans that go to different end points starting from the Employee entity.</SPAN></FONT></DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007></SPAN></FONT>&nbsp;</DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007>There is also a Tech Tip on Span Queries that has an example of a multi-level span (Order to Product).&nbsp; This Tech Tip is in level 200.&nbsp; Tech Tips can be viewed on our Web site, and, for more recent versions of DevForce, can also be accessed from the DevForce menu.</SPAN></FONT></DIV><DIV dir=ltr align=left><FONT face=Arial size=2><SPAN =313440101-08062007></SPAN></FONT>&nbsp;</DIV><DIV dir=ltr align=left></o:p></SPAN></DIV>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 15:57:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=700#700</guid>
  </item> 
  <item>
   <title>How to do equivalent of left join : Using the same example, our requirement...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=699#699</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 308<br /><strong>Posted:</strong> 16-Jul-2007 at 3:56pm<br /><br /><SPAN ="449201219-07062007"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Using the same example, our requirement is <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></SPAN><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><O:P></SPAN></P><P style="TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1" ="MsoListParagraph"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Given a moduleId, get all the modules and all the related Category , ReportMaster and UserReport objects in one database trip. The AddSpan seems to work for 1 level deep (Module </SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Wingdings">à</SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"> Category) but we would like to go 3 or 4 levels deep.<O:P></O:P></SPAN></P><P style="TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1" ="MsoListParagraph"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><SPAN style="mso-list: Ignore">b)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">I think we are looking for a span because it seems like the subquery method works good if we need to implement a where clause on one of the children.<O:P></O:P></SPAN></P><P style="TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1" ="MsoListParagraph"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><SPAN style="mso-list: Ignore">c)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">The dot notation is inefficient in certain situations where we are applying this because there are too many database trips being made.<O:P></O:P></SPAN></P><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><O:P>&nbsp;</O:P></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">(It is&nbsp; 1 to many starting from Module </SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Wingdings">à</SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"> Category </SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Wingdings">à</SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"> ReportMaster </SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: Wingdings">à</SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"> UserReport)<O:P></O:P></SPAN></P><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><O:P>&nbsp;</O:P></SPAN><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">If you need more details, please let me know. <O:P></O:P></SPAN></P></SPAN><span style="font-size:10px"><br /><br />Edited by Customer - 16-Jul-2007 at 3:56pm</span>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 15:56:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=699#699</guid>
  </item> 
  <item>
   <title>How to do equivalent of left join : In looking at your question I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=698#698</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=21" rel="nofollow">IdeaBlade</a><br /><strong>Subject:</strong> 308<br /><strong>Posted:</strong> 16-Jul-2007 at 3:55pm<br /><br /><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><FONT face=Arial><FONT color=#0000ff><FONT size=2>I<SPAN ="449201219-07062007">n looking at your question I'm a little embarrassed in that the code for the EntityQuery that I sent was more complicated than it had to be.&nbsp; In fact that probably is the right code if you have a requirement that there be at least one child entity for the parent entity.&nbsp; If you do not have that requirement, then it would be sufficient to simply define and execute the topmost EntityQuery, i. e. </SPAN></FONT></FONT></FONT><DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN ="449201219-07062007"></SPAN></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT face=Arial><FONT size=+0><FONT size=2><SPAN ="449201219-07062007"><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">EntityQuery aModuleQuery = new EntityQuery(typeof (Module),"Id",EntityQueryOp.EQ, SomeModuleId);</SPAN></P><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"></SPAN><O:P><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Module aModule&nbsp;&nbsp;= mPm.GetEntity&lt;Module&gt;(aModuleQuery);</SPAN></P><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"></SPAN>&nbsp;</P><P ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"></SPAN><?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P><SPAN ="449201219-07062007"><FONT face=Arial size=2>You then access any entities that are descended from the parent entity, such as Category, ReportMaster, and UserReport, using what we call dot notation as shown in the for each statement.</FONT></SPAN></O:P></P></O:P></SPAN></FONT></FONT></FONT></DIV></SPAN><span style="font-size:10px"><br /><br />Edited by IdeaBlade - 16-Jul-2007 at 3:55pm</span>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 15:55:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=698#698</guid>
  </item> 
  <item>
   <title>How to do equivalent of left join : This works if all the related...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=697#697</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 308<br /><strong>Posted:</strong> 16-Jul-2007 at 3:53pm<br /><br /><P =Ms&#111;normal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">This works if all the related tables have data in them. In the example below, if a child table (say Category) doesn’t have records, then aModuleQuery wouldn’t return any records even though the Module table has records. I guess that is because DevForce doesn’t understand the concept of a left join as we know it in standard t-sql. &nbsp;Would this be correct? (Referring to pseudocode for EntityQuery sent in&nbsp;response to task 2030).</SPAN></P>]]>
   </description>
   <pubDate>Mon, 16 Jul 2007 15:53:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=308&amp;PID=697#697</guid>
  </item> 
 </channel>
</rss>