Create selected enums with TDL template?

Posts   
 
    
Kevinksy
User
Posts: 27
Joined: 05-Jun-2013
# Posted on: 29-Oct-2013 15:55:49   

Any suggestions about creating enums using values from two linked tables such as this TABLE ACTIVITY ( ID NUMBER(9) NOT NULL, --primary key TENANT_ID NUMBER(9) DEFAULT 1 NOT NULL, ACTIVITY_TYPE_ID NUMBER(9) DEFAULT 1 NOT NULL); TABLE ACTIVITY_LOCALE ( ACTIVITY_ID NUMBER(9) NOT NULL, --primary key Activity_id,Locale_id LOCALE_ID NUMBER(9) DEFAULT 2, VALUE VARCHAR2(200 CHAR) NOT NULL);

and the end result would be public enum Activity { DateCaseOpened = 4926, DateCaseClosed = 4935, // and so on where the first value is Activity_Locale.VALUE where locale_id = 2 // and the numeric value is from Activity.ID }

can this be done with a TDL template or is there a simpler way?

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 29-Oct-2013 18:29:36   

I don't see the need for the Activity table for constructing the enum. Am I missing something?

Kevinksy
User
Posts: 27
Joined: 05-Jun-2013
# Posted on: 29-Oct-2013 18:35:46   

Hi You are correct you do not need the parent table just Activity_locale, and this is also true of all the other tables that I would like to get enums created for. Sorry!