<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://code.msdn.microsoft.com/rss.xsl"?><rss version="2.0"><channel><title>LinqEntityDataReader Work Item Rss Feed</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/List.aspx</link><description>LinqEntityDataReader Work Item Rss Description</description><item><title>CLOSED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;</description><author>dbrowne</author><pubDate>Mon, 03 Nov 2008 23:08:21 GMT</pubDate><guid isPermaLink="false">CLOSED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081103P</guid></item><item><title>COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;Comments: Uploaded a new version today that should resolve this issue, along with better support for Entity Framework and dramatically improved performance for large collections.&amp;#13;&amp;#10;&amp;#13;&amp;#10;For selecting which properties to project, there is now a list of types which get projected into DataReader columns. &amp;#13;&amp;#10;&amp;#13;&amp;#10;HashSet&amp;#60;Type&amp;#62; set &amp;#61; new HashSet&amp;#60;Type&amp;#62;&amp;#40;&amp;#41; &amp;#13;&amp;#10;&amp;#123; &amp;#13;&amp;#10;&amp;#47;&amp;#47;reference types&amp;#13;&amp;#10;typeof&amp;#40;String&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Byte&amp;#91;&amp;#93;&amp;#41;,&amp;#13;&amp;#10;&amp;#47;&amp;#47;value types&amp;#13;&amp;#10;typeof&amp;#40;Byte&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int16&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int32&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int64&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Single&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Double&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Decimal&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;DateTime&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Guid&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Boolean&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;TimeSpan&amp;#41;,&amp;#13;&amp;#10;&amp;#47;&amp;#47;nullable value types&amp;#13;&amp;#10;typeof&amp;#40;Byte&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int16&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int32&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int64&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Single&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Double&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Decimal&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;DateTime&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Guid&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Boolean&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;TimeSpan&amp;#63;&amp;#41;&amp;#13;&amp;#10;&amp;#125;&amp;#59;&amp;#13;&amp;#10;In addition for Entity Framework entities, properties of type EntityReference will be traversed to get the key values of the related entity.&amp;#13;&amp;#10;&amp;#13;&amp;#10;David</description><author>dbrowne</author><pubDate>Wed, 08 Oct 2008 19:49:28 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081008P</guid></item><item><title>COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;Comments: Uploaded a new version today that should resolve this issue, along with better support for Entity Framework and dramatically improved performance for large collections.&amp;#13;&amp;#10;&amp;#13;&amp;#10;For selecting which properties to project, there is now a list of types which get projected into DataReader columns. &amp;#13;&amp;#10;&amp;#123;&amp;#123;&amp;#13;&amp;#10;HashSet&amp;#60;Type&amp;#62; set &amp;#61; new HashSet&amp;#60;Type&amp;#62;&amp;#40;&amp;#41; &amp;#13;&amp;#10;&amp;#123; &amp;#13;&amp;#10;&amp;#47;&amp;#47;reference types&amp;#13;&amp;#10;typeof&amp;#40;String&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Byte&amp;#91;&amp;#93;&amp;#41;,&amp;#13;&amp;#10;&amp;#47;&amp;#47;value types&amp;#13;&amp;#10;typeof&amp;#40;Byte&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int16&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int32&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int64&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Single&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Double&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Decimal&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;DateTime&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Guid&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Boolean&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;TimeSpan&amp;#41;,&amp;#13;&amp;#10;&amp;#47;&amp;#47;nullable value types&amp;#13;&amp;#10;typeof&amp;#40;Byte&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int16&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int32&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Int64&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Single&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Double&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Decimal&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;DateTime&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Guid&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;Boolean&amp;#63;&amp;#41;,&amp;#13;&amp;#10;typeof&amp;#40;TimeSpan&amp;#63;&amp;#41;&amp;#13;&amp;#10;&amp;#125;&amp;#59;&amp;#13;&amp;#10;&amp;#125;&amp;#125;&amp;#13;&amp;#10;In addition for Entity Framework entities, properties of type EntityReference will be traversed to get the key values of the related entity.&amp;#13;&amp;#10;&amp;#13;&amp;#10;David</description><author>dbrowne</author><pubDate>Wed, 08 Oct 2008 19:49:13 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081008P</guid></item><item><title>EDITED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;</description><author>dbrowne</author><pubDate>Wed, 08 Oct 2008 19:48:41 GMT</pubDate><guid isPermaLink="false">EDITED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081008P</guid></item><item><title>COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;Comments: Uploaded a new version today that should resolve this issue, along with better support for Entity Framework and dramatically improved performance for large collections.&amp;#13;&amp;#10;&amp;#13;&amp;#10;For selecting which properties to project, there is now a list of types which get projected into DataReader columns.  &amp;#13;&amp;#10;&amp;#13;&amp;#10;      HashSet&amp;#60;Type&amp;#62; set &amp;#61; new HashSet&amp;#60;Type&amp;#62;&amp;#40;&amp;#41; &amp;#13;&amp;#10;                              &amp;#123; &amp;#13;&amp;#10;                                &amp;#47;&amp;#47;reference types&amp;#13;&amp;#10;                                typeof&amp;#40;String&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Byte&amp;#91;&amp;#93;&amp;#41;,&amp;#13;&amp;#10;                                &amp;#47;&amp;#47;value types&amp;#13;&amp;#10;                                typeof&amp;#40;Byte&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Int16&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Int32&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Int64&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Single&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Double&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Decimal&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;DateTime&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Guid&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Boolean&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;TimeSpan&amp;#41;,&amp;#13;&amp;#10;                                &amp;#47;&amp;#47;nullable value types&amp;#13;&amp;#10;                                typeof&amp;#40;Byte&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Int16&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Int32&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Int64&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Single&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Double&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Decimal&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;DateTime&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Guid&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;Boolean&amp;#63;&amp;#41;,&amp;#13;&amp;#10;                                typeof&amp;#40;TimeSpan&amp;#63;&amp;#41;&amp;#13;&amp;#10;                              &amp;#125;&amp;#59;&amp;#13;&amp;#10;In addition for Entity Framework entities, properties of type EntityReference will be traversed to get the key values of the related entity.&amp;#13;&amp;#10;&amp;#13;&amp;#10;David</description><author>dbrowne</author><pubDate>Wed, 08 Oct 2008 19:48:41 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081008P</guid></item><item><title>EDITED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;</description><author>dbrowne</author><pubDate>Wed, 01 Oct 2008 22:22:18 GMT</pubDate><guid isPermaLink="false">EDITED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081001P</guid></item><item><title>COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;Comments: Uploaded a new version today that should resolve this issue, along with better support for Entity Framework and dramatically improved performance for large collections.&amp;#13;&amp;#10;&amp;#13;&amp;#10;The property filter I ended up with is this&amp;#58;&amp;#13;&amp;#10;&amp;#13;&amp;#10;      var allProperties &amp;#61; from p in thisType.GetProperties&amp;#40;&amp;#41;&amp;#13;&amp;#10;                          where p.PropertyType &amp;#33;&amp;#61; typeof&amp;#40;EntityKey&amp;#41;   &amp;#47;&amp;#47;EF infrastructure properties&amp;#13;&amp;#10;                             &amp;#38;&amp;#38; p.PropertyType &amp;#33;&amp;#61; typeof&amp;#40;EntityState&amp;#41;  &amp;#47;&amp;#47;EF infrastructure properties&amp;#13;&amp;#10;                             &amp;#38;&amp;#38; &amp;#33;typeof&amp;#40;EntityObject&amp;#41;.IsAssignableFrom&amp;#40;p.PropertyType&amp;#41;  &amp;#47;&amp;#47;EF Objects&amp;#13;&amp;#10;                             &amp;#38;&amp;#38; &amp;#33;typeof&amp;#40;INotifyPropertyChanged&amp;#41;.IsAssignableFrom&amp;#40;p.PropertyType&amp;#41; &amp;#47;&amp;#47;L2S objects&amp;#13;&amp;#10;                          select new &amp;#13;&amp;#10;                          &amp;#123;&amp;#13;&amp;#10;                            PropertyInfo&amp;#61;p,&amp;#13;&amp;#10;                            IsRelationProperty &amp;#61; typeof&amp;#40;RelatedEnd&amp;#41;.IsAssignableFrom&amp;#40;p.PropertyType&amp;#41;&amp;#13;&amp;#10;                          &amp;#125;&amp;#59;</description><author>dbrowne</author><pubDate>Wed, 01 Oct 2008 22:22:18 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20081001P</guid></item><item><title>EDITED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;</description><author>dbrowne</author><pubDate>Thu, 25 Sep 2008 00:09:28 GMT</pubDate><guid isPermaLink="false">EDITED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20080925A</guid></item><item><title>COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;Comments: Thanks.  I&amp;#39;ll look into it.  Especially with Entity Framework that doesn&amp;#39;t expose foreign key properties and see if I can find a workaround that works for that too.</description><author>dbrowne</author><pubDate>Thu, 25 Sep 2008 00:09:27 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20080925A</guid></item><item><title>CREATED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables</title><link>http://code.msdn.microsoft.com/LinqEntityDataReader/WorkItem/View.aspx?WorkItemId=1</link><description>If the LINQ entity has a relationship to other table &amp;#40;e.g. a CustomerID field in the Orders table&amp;#41;, I get an InvalidOperationException&amp;#58;&lt;br /&gt;     &amp;#34;The given ColumnMapping does not match up with any column in the source or destination.&amp;#34;&lt;br /&gt;&lt;br /&gt;I tracked this down to the EntityDataReader constructor. In the propertyCache query, we just need to add a where clause to filter out the table entity classes &amp;#40;e.g. &amp;#34;Customer&amp;#34;&amp;#41; like this&amp;#58;&lt;br /&gt;&lt;br /&gt;var cc &amp;#61; from p in t.GetProperties&amp;#40;BindingFlags.Instance &amp;#124; BindingFlags.Public&amp;#41;&lt;br /&gt;                     where p.PropertyType.Namespace &amp;#33;&amp;#61; this.GetType&amp;#40;&amp;#41;.Namespace &amp;#47;&amp;#47; filter out the joined table properties&lt;br /&gt;                     select p&amp;#59;&lt;br /&gt;&lt;br /&gt;Of course, this assumes that the EntityDataReader class is in the same namespace as the LINQ data context class. The filter condition could also be a &amp;#33;StartsWith instead of &amp;#33;&amp;#61; to support nested classes&amp;#47;namespaces...&lt;br /&gt;</description><author>ubergeek</author><pubDate>Sun, 14 Sep 2008 04:15:48 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: InvalidOperationException when bulk inserting entities with relationships to other tables 20080914A</guid></item></channel></rss>