Database column names are not the same as the property names
I have a class with an external table. However, the column names are not the same as the property names and the data in the columns of the external table aren't being populated using obj-save methods. Anybody has a solution for this? Or is a hot fix available?
1. Yes, the table contains the primary key as well as pxobjclass columns.
2. The class is a class group. I created a Database table mapping rule and did the schema/table mapping. The class appears in the list of tables with external mappings but the number of mapped columns is not reflected. The edit button for the row doesn't seem to work.
3. Verified the schema in the external as well as the internal table.
4. Column names have been mapped using the exact case as the columns in the external table.
if column and property name will not match, that will never going to be populated, either make both having same name of create an additional property which is matching the column name and write a declare expression which will fire at obj-save and will have similar value which is there in blob and expose this property and the columns will be populated after that.
This is basics of O-R-M, class and properties need to map correctly so the table can get the data.
If the column names are not same it will never get populated, you should create with same names. Why there is a need to map to the external table cant you do the data migration which would be one time migration & have the table as internal table? you can form the pzinskey & can update the database.