Book a Demo

Author Topic: Modelling Oracle Stored Procedures  (Read 3941 times)

Darren Lock

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Modelling Oracle Stored Procedures
« on: June 18, 2003, 05:24:48 am »
What is the correct way to model a package of stored procedures and more importantly how to do this to ensure the DDL generator to creates the necessary DDL?
Darren Lock
United Kingdom

hd

  • EA Administrator
  • EA User
  • *****
  • Posts: 312
  • Karma: +0/-0
    • View Profile
Re: Modelling Oracle Stored Procedures
« Reply #1 on: June 18, 2003, 08:55:42 pm »
Stored procedures are currently only generated when attached to a table.
However, you can add stored procedures to a package with the following steps...

1. Add a table(s) to a package, and select a target database.
2. Add an operation and give it the name of the stored procedure.
3. Select 'proc' from the stereotype combo.
4. Put the body of the procedure in the Notes section of the dialog. Save.
5. Right click on the package and select Code Engineering->Generate DDL.
6. Check 'Create Primary/Foreign Key Constraints' and 'Generate Stored Procedures'.
7. Generate the procedures.

Hope this helps.