Table Structure Not Updating On EDMX
Table Structure Not Updating On EDMX
We are using the connector with Entity Framework. Once the EDMX has been generated, if the table structure in Salesforce changes, updating the EDMX doesn't seem to add any new fields to the tables that have already been added to the EMDX. In fact, if we remove all of the tables from the EDMX and do an "update model from database" and re-add the tables, they still will not have the new fields. Is the structure being cached? If so, how do we clear the cache to allow the update to see the new fields?
Re: Table Structure Not Updating On EDMX
Please check if a new column exists in the database via web interface of http://www.salesforce.com.
If the column does exist in the database, the reason of the problem with its availability in client application is that your local metadata cache is out-of-date: http://www.devart.com/dotconnect/salesf ... rview.html. In this case, there are alternative ways to solve the issue:
1) execute the code:2) the "Refresh Metadata=true;" connection string parameter causes a refresh of Salesforce metadata each time when the connection is opened. Leads to the performance loses.
3) remove the C:\Users\YOUR_OS_USER_NAME\Application Data\*.db files. dotConnect for Salesforce will recreate them on the next connection.Open().
If the column does exist and it is a system field, you should add "System Objects=true;" to your connection string (and call conn.Cache.RefreshMetadata() after this) to have access to the system fields of the Salesforce objects.
If the column does exist in the database, the reason of the problem with its availability in client application is that your local metadata cache is out-of-date: http://www.devart.com/dotconnect/salesf ... rview.html. In this case, there are alternative ways to solve the issue:
1) execute the code:
Code: Select all
SalesforceConnection conn = new SalesforceConnection(connString);
conn.Open();
conn.Cache.RefreshMetadata();
3) remove the C:\Users\YOUR_OS_USER_NAME\Application Data\*.db files. dotConnect for Salesforce will recreate them on the next connection.Open().
If the column does exist and it is a system field, you should add "System Objects=true;" to your connection string (and call conn.Cache.RefreshMetadata() after this) to have access to the system fields of the Salesforce objects.