Print Page | Close Window

Strangest mapping error

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2077
Printed Date: 21-Apr-2026 at 10:12pm


Topic: Strangest mapping error
Posted By: BillG
Subject: Strangest mapping error
Date Posted: 19-Aug-2010 at 9:23am
I added a new field to a table. I refresh my edmx file and I can see the field in the table object. I add a default value to the field in the classes create method and it compiles fine. I place a breakpoint at the place in the code where an object of the class is created for the first time in the program and the property is not there. I check the SQL statement in Intellitrace and the SQL statement does not have the new field in it. I deleted the table from the edmx and remapped it and still the same thing. I can see the property is there because intellisence picks it up when i type the name of the table and hit .
 
The problem is the select statement does not pick it up. Here is my code.
 
         var query = from InventoryDetail in entityManager.InventoryDetails
                      where InventoryDetail.ItemId == currentItem.ItemId
                      select InventoryDetail;
 
As you can see I am not specifying any fields, I want all of them. The SQL statement in Intellitrace shows all the fields being queried except for the new one. I even added a new field on top of that one and it still won't change the SQL Statement.
 
 

 



Print Page | Close Window