1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Confuse with TopLink

Discussion in 'Oracle Forms and Reports' started by callme_harry, Oct 23, 2008.

  1. callme_harry

    callme_harry Active Member

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    80
    Hi,


    I have a question with TopLink.

    Here is my story step by step,
    1. I have existing database so i just used "Create Java Objects from Table Wizard" in wizard i do the following
    -. I created top link map named tlMap1 using my connection
    -. I select 3 table : employee, department, bank and click finish
    -. TopLink and POJO generated

    2. I edit TopLink to add query findEmployeeById, findDepartmentById, findBankById

    3. I generate session beans

    4. I create data control from session beans

    5. So far its okay, but than i realize in my database i FORGOT to define FOREIGN KEY relation between department and employee table.

    Thats my story and my question is how can we fix that problem with minimal effort since i already had pojo (see step 1), custom query in toplink map (see step 2), session beans (see step 3) and data control (step 4).

    FYI : I using JDev 10.1.3.3
     
  2. sameer

    sameer Forum Advisor

    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    240
    Hi harry, i believe since you want to alter your table, you may need to re create the classes i.e redo your steps

    however, i am not sure about this... will need to dig in a little
     
  3. callme_harry

    callme_harry Active Member

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    80
    Sammer thank you for reply.

    I found out adding code manually to POJO is the best solution for this.
     
  4. sameer

    sameer Forum Advisor

    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    240
    hi harry.. actually am sorry couldn't help u more but glad that u found solution.