Nuno
In objects easy
set o=##class(Entity).%OpenId(some_id)
write o.%ClassName(1)
in SQL not so easy - SQL knows nothing about polymorphism
you need to store the actual class name as a property
class Entity
property pClassName as %String[initialexpression={..%ClassName(1)}];
Peter
On Thu, 06 May 2004 10:46:33 +0100, Nuno Canas <[EMAIL PROTECTED]>
wrote:
>I have the following classes:
>
>Entity (the main one)
>Person (Extends Entity)
>Customer (Extends Entity)
>Employee (Extends Person)
>
>What I want, and is happening, is when I create a record under Employee
>it goes to Entity as well when a Customer or Person is created.
>
>How can I see (looking to Entity) what kind of type is it ? (Person,
>Customer, etc..)
>
>TIA
>
>Rgrds
>
>Nuno