Discussion
Virtusa Consulting Services Pvt. Limited
IN
Last activity: 8 Jul 2015 7:03 EDT
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?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
NIIT Technologies Limited
AU
Configure property-column mappings on the 'External Mapping' tab of class rule form.
Virtusa Consulting Services Pvt. Limited
IN
@Ravi : I forgot to mention that. Property-Columns have been specified in the class rule form. Version of PRPC : 7.1.6
NIIT Technologies Limited
AU
Did you resave the corresponding D-A-DB-Table instance or restart the server after specifying property-columns mapping?
Virtusa Consulting Services Pvt. Limited
IN
Resaved/Revalidated the D-A-DB table and restarted the server with clear cache.
Pegasystems Inc.
IN
1. does the table contain primary key?
2. have you attempted to run the table through Database class mapping wizard?
3. could you please verify in which schema the table is created...
4. also map the table column names and property names exactly ... same casing should be considered.
NIIT Technologies Limited
AU
If you have resaved DADT, it should work.
Can you please provide DDL of your external table?
It should have pzInsKey and pxObjClass columns.
Pegasystems Inc.
IN
if it is an external table, it should not contain pzInsKey and pxObjClass columns in the table. if it has it will be treated as internal table.
an external table can be considered as internal table if it has one primary key column.
Pegasystems Inc.
IN
an external table can be considered as internal table if it has one primary key column to apply Obj- methods.
virtusa
IN
@Ravi,
the DDL ishaving PZinskey and pxobjclass .
the problem is work class of our aplication is created initially , later we created external DB table .
now we are mapping these properties to the external table, whcih is not working now for us.
Virtusa Consulting Services Pvt. Limited
IN
@sahup1 :
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.
There is only 1 primary key to the table.
Pegasystems Inc.
IN
could you also please try Connector and Metadata Wizard...
PEG
IN
I think we should use RDB(RDB-Open,RDB-Save etc.) methods when we use external class.
Pegasystems Inc.
IN
yes gollg - for accessing external tables we have to use RDB methods. but if there is any primary column we could still reffer the external table as internal table and use Obj methods
Pegasystems Inc.
US
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.
Cognizant Technology Solutions
IN
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.