New Posts New Posts RSS Feed: Strangest mapping error
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Strangest mapping error

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Strangest mapping error
    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.
 
 

 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down