# SQLNav 5.1 error when defining object subtype

**URL:** <https://forums.toadworld.com/t/sqlnav-5-1-error-when-defining-object-subtype/3247>\
**Category:** SQL Navigator\
**Created:** [September 21, 2007, 10:00am UTC](https://forums.toadworld.com/t/sqlnav-5-1-error-when-defining-object-subtype/3247 "2007-09-21T10:00:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickruiz](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nickruiz](https://forums.toadworld.com/u/nickruiz)\
**Post date:** [September 21, 2007, 10:00am UTC](https://forums.toadworld.com/t/sqlnav-5-1-error-when-defining-object-subtype/3247/1 "2007-09-21T10:00:08Z")

</div>

Hello,

I have defined the attached object in PL/SQL (it happens to be a user-defined number array, named NUM\_ARRAY\_NWR). This object is intended to be a super type and will have a subtype called INTERVAL\_DATA\_NWR. My code for INTERVAL\_DATA\_NWR is listed here:

Object spec:  
TYPE INTERVAL\_DATA\_NWR UNDER NUM\_ARRAY\_NWR (

```
minutesPerInterval NUMBER,

CONSTRUCTOR FUNCTION INTERVAL_DATA_NWR (
    p_name IN VARCHAR2,
    p_minutesper IN NUMBER
)
    RETURN SELF AS RESULT

```

)  
NOT FINAL;

Object body:  
TYPE BODY INTERVAL\_DATA\_NWR  
AS  
CONSTRUCTOR FUNCTION INTERVAL\_DATA\_NWR (  
p\_name IN VARCHAR2,  
p\_minutesper IN NUMBER  
)  
RETURN SELF AS RESULT  
IS  
BEGIN  
SELF.item := NEW NUM\_ARRAY();  
SELF.myName := p\_name;  
SELF.minutesPerInterval := p\_minutesper;  
RETURN;  
END;  
END;

My problem is that when I attempt to compile the subtype, SQLNav decides to turn my spec into this:

Object spec:  
TYPE INTERVAL\_DATA\_NWR (  
p\_name IN VARCHAR2,  
p\_minutesper IN NUMBER  
)  
RETURN SELF AS RESULT  
)  
NOT FINAL;

And then, SQLNav nags me that the syntax is incorrect. Judging by the object type documentation located at [http://download-west.oracle.com/docs/cd/B10501\_01/appdev.920/a96624/10\_objs.htm](http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/10_objs.htm), my syntax for my subtype seems to be correct. Could you provide any assistance as to why SQLNav is acting in this behavior, and how I might be able to work around this issue?

Thank you,  
Nick Ruiz

CUSTPRO.NUM\_ARRAY\_ddl.sql (231 Bytes)

CUSTPRO.NUM\_ARRAY\_NWR.typ (15.4 KB)

---

<div class="post-metadata">

**Author:** ![sekhar.bommireddypal](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sekhar.bommireddypal](https://forums.toadworld.com/u/sekhar.bommireddypal)\
**Post date:** [September 23, 2007, 8:22pm UTC](https://forums.toadworld.com/t/sqlnav-5-1-error-when-defining-object-subtype/3247/2 "2007-09-23T20:22:29Z")

</div>

HI Nick,

Welcome to community.  
There does appear to be a problem with the way that SQL navigator is handling the subtypes of super type while in compilation.  
We have made a note of this end but if you want to able to track this issue, you will need to raise a support case.

Thanks heaps for supplying the attachments and scripts… they were most helpful to us.

regards  
sekhar
