Create abstract class manually instead of using Data Type
In my project all Data class are declared as "Concrete" class. Well, if the class is persistent (meaning has instances in the database) this is totally fine, but every class which was supposed to be declared as "Abstract" (meaning just referenced to from Work class as a page with no database records) is also declared as "Concrete". This reduces readability.
I have noticed that developers use Data Type in Data Explorer for creating any Data class (See below screenshot). And, this tool creates Data class as "Concrete" always, and map it to PR_OTHER table. At the same time, it creates even History-Data class as well. After Data Type is created, if you do "Configure source" in Records tab, it actually creates a physical database table and remap it to this from PR_OTHER.
Here is what I think:
I understand Pega wizard creates a bunch of stuff for a majority of people for ease, but shouldn't Data Type create a Data class as "Abstract" first without History class. Only when developer does "Configure source" it should change it to Concrete and creates History class and physical database table altogether.
Or, is this "Data Type" designed only for persistent Data class from the beginning? i.e. if you want to create an Abstract class, you always need to create it manually from rule type explorer by right click?
I tried testing the scenario which you did explain above.
By design, data class is created automatically as "CONCRETE" when creating a table in Data Explorer by "Add Data Type".
Or, is this "Data Type" designed only for persistent Data class from the beginning? - YES.
TSUCK: but shouldn't Data Type create a Data class as "Abstract" first without History class. Only when developer does "Configure source" it should change it to Concrete and creates History class and physical database table altogether.?
Dilip: Every record in table is an instance. Purpose of Data table is to hold records, I don't see the purpose why it has to be created as "Abstract" in first place? and later to get changed "CONCRETE" upon records are added.
I remember the situation, having a CAR, but why do we need the steering mounted even when car is parked?