Peter Cooper wrote: >Class A persistent > >Class B extends A > > >select * from class A >will return the whole extent of A including instances that are B's but >SQL knows nothing about this as far as it is concerned everyting is an >A
Cach� automatically creates the x__classname column for SQL tables that can be used to differentiate between super and subclasses. This column is visible in SQL manager on the General tab when a table is selected. (The %classname var/column (?) apparently always returns the name of the superclass.) A quick test reveals that x__classname is NULL for the superclass, and contains ~Package.Subclass~ for the subclass. So, to use solely SQL to query for just the superclass instances, you can use something like: SELECT * FROM A WHERE x__classname IS NULL No need for adding properties here. (Tested on 5.0.8.) HTH, Gertjan. -- Gertjan Klein
