I'm trying out some OOP coding in PL/SQL to see if it might be worth using in a project. So far it's not looking good...
Say I have 2 objects, Organization and Department. Org looks like:
create type Organization as object (
depts Departments -- the departments collection (there are many departments)
) not final;
and the Department object I want to inherit the orgs attributes, and looks like:
create type Department as object under Organization (
then the Departments collection:
create type Departments as table of Department;
Now this all fails because I can't compile Department until Organization is compiled, and I cant compile that until Departments is compiled...which cannot be created until Department exists...
I tried using a forward type definition, like so:
create type Departments;
which creates, but the Organization and Department still fail to compile.
I think I'm missing something conceptually or syntactically...not sure which...
How would such a scenario be coded?