This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am not sure if this is by design, or a, dare I say it .... a bug, but when I use the Import() method to import an entity from one database into another database, all the property names must be the same exact case, otherwise the property value is not imported. I have two MS SQL databases, with identical tables, and identical field names, but for some reason when I imported the tables into the designer, one property was assigned the name SQLServer, the other SqlServer. Strange as in the database they are both SQLServer. On importing a record all the other properties received the correct data value, but the SQLServer field remained null. This is really annoying as we sync around 50 tables, with each table containing upwards of 20 columns, I thought my program was running well, but now I have to check the values of every table and every column, to confirm that we have the case correct in the all entity properties for both databases. |
|
|
This is intentional due to potential language case sensitivity (e.g. C#). You can however supply your own mapping function via one of the overloads on Import which allows you to implement your own behaviour. Not ideal I know but this is our escape clause option here for any custom mapping scenario. If this is a cross database migration with the same schema can you not just use the same model? Im curious about the designer providing "SQLServer" as a name for one of the columns (SqlServer would be whats expected by default) - are you using a naming strategy?
|
|
|
Hi Jeremy, Many thanks for your prompt reply. Unfortunately we cannot use the same model as the schema is different in the two databases. The one database only contains a subset of tables, and within those tables a subset of columns, a light weight version of the master database. With regards to creating a mapping, that still entails searching for all anomalies in to begin with, so it would be easier, although still very time consuming, to change all the cases to match as I go. Again, many thanks, Mark |
|