I have created and populated twelve relational tables which are from a
logical point of view related in a highly hierarchical way. Because I need
to create a xml file, I created an object view based on these tables. I have
5 levels in this structure so I'm stick with 5 levels of collections too.
The problem is that the collection types are not allowed in the xml data.
I'll give an example :
CREATE OR REPLACE VIEW EmployerDeclarationView AS SELECT
id90007,
companyid,
netowedamount,
system5,
holidaystartingdate,
CAST(MULTISET(SELECT Naturalpersonsequencenbr,
Inss ,
WorkerName ,
WorkerFirstname ,
WorkerInitial ,
WorkerBirthdate ,
WorkerSex ,
WorkerStreet ,
WorkerHousenbr ,
WorkerPostbox ,
WorkerZipcode ,
WorkerCity ,
WorkerCountry ,
Nationality ,
Sis ,
WorkerBirthPlace ,
WorkerBirthPlaceCountry ,
workerrecordtype_list
FROM NaturalPersonView
WHERE id90007 = e.id90007)
AS NaturalPersonType_table) AS NaturalPersonType_list
FROM EmployerDeclaration e;