Question

Creating a new table for a class?

Is there any way for me to get Pega to create a table in PegaDATA specifically for a class to use?

When I create a new class, it usually maps to pr_other. Let say, I want a table besides pr_other

The class in question is TGB-HRApps-Data-TestData

I basically want a table specifically for all instances of this class, so I can do things like running a report definition on exposed properties of the class, and doing keyed access. I don't want my class instances to be mixed up with instances of a different class in pr_other

Correct Answer
July 25, 2018 - 2:56pm

Hi Bryan,

I don't think there is an option to create a table directly from the prpc, you will have to create from the db and then run  the db table class mapping.

Hope this helps you.

Regards,

Basavaraj

Comments

Keep up to date on this post and subscribe to comments

Pega
July 25, 2018 - 2:56pm

Hi Bryan,

I don't think there is an option to create a table directly from the prpc, you will have to create from the db and then run  the db table class mapping.

Hope this helps you.

Regards,

Basavaraj

July 25, 2018 - 3:03pm
Response to BASAVARAJ

Hey Basavaraj,

 

I was afraid that this would be the answer. I had a feeling that there are no options to directly create tables in PRPC.

 

Thanks a lot for the insight,

Bryan

July 26, 2018 - 2:02am
Response to BryanC97

Yes we dont have any option in pega.

July 16, 2019 - 3:39pm
Response to Gayatri

July 26, 2018 - 1:55am

I dont think we have direct option to do this

November 2, 2019 - 3:35pm

Pega can create the corresponding table when creating a new class. 
I use DataTableEditorReport to configure the properties. 

  1. Create a data class
    1. Select concrete 
    2. Select does not belong to a class group
    3. Set the key name
    4. Save the class

Next save DataTableEditorReport report into your new class.

  1. Configure DataTableEditorReport to use your properties
  2. Include your key as one of the properties
  3. Save the report.

Next

  1. Open the class in the data designer (one of two ways)
    1. In the app explorer right click on the class name and click on create properties
    2. On class definition, click on drop down next to class name, select view in data designer.
  2. Click on records tab
  3. The following message will appear
    1. Warning : We were unable to create columns to match the new properties added. This will cause performance problems when using this data type. Please click here to fix this.
    2. Click on here.

Pega will optimize the properties and generate the table with the same name as the class up to 27 characters, prepending pr_