5 Replies Latest reply on Jan 14, 2008 9:34 AM by Steve Muench-Oracle

    ADF BC : change Entity attribute type to DBSequence

    Jan Vervecken
      hi

      Please consider this scenario (in JDeveloper 10.1.3.3.0):

      (1) From the "New Gallery", select "Business Components from Tables" to launch the wizard.
      (2) Select a connection to the HR database schema.
      (3) In "Step 1 of 5: Entity Objects", Query the HR schema and select both the HR.DEPARTMENTS and the HR.EMPLOYEES tables.
      (4) In "Step 2 of 5: Updatable View Objects", select both available Entity Objects.
      (5) In "Step 3 of 5: Read-Only View Objects", click "Next".
      (6) In "Step 4 of 5: Application Module", type the name "HRService" for the new Application Module, and click "Finish".

      After the "default" ADF Business Components are created ...

      (7) Select "Edit DepartmentsView..." on the "DepartmentsView" View Object.
      (8) In the "View Object Editor" on the "Java" panel, select "Generate Java File" for "DepartmentsViewRowImpl", and click "OK".
      (9) Select "Edit EmployeesView..." on the "EmployeesView" View Object.
      (10) In the "View Object Editor" on the "Java" panel, select "Generate Java File" for "EmployeesViewRowImpl", and click "OK".
      (11) Select "Rebuild" on the project node, there should be no errors.

      (12) Select "Edit Departments..." on the "Departments" Entity Object.
      (13) In the "Entity Object Editor", below the "Attributes" node, select the panel for "DepartmentId".
      (14) On the "Entity Attribute" tab change the type from "Number" to "DBSequence", and click "OK".

      A Business Components message shows up:
      "Unable to change the name or type of the object until relationships depending on it are removed.
      DepartmentID -> DepartmentsView"

      question :
      What is the best approach in the current situation to change the type of the Entity Object attribute "DepartmentId" from Number to DBSequence?

      many thanks
      Jan Vervecken