Hi Sander, "Thinking about this" is already on the roadmap :-) https://sourceforge.net/apps/trac/jooq/ticket/644
Although, I was not aware of Postgres implementing a similar thing as Oracle. Oracle PL/SQL is actually both a procedural AND an object-oriented language, although I doubt that the latter is used very often. You can create OBJECT types, which inherit from other OBJECT types using the UNDER keyword, similar to Java's "extends" keyword. All attributes and member procedures/functions are then inherited. Also, you can create OBJECT VIEWs and OBJECT TABLEs, which can then be reused in SQL and/or stored procedures. Really powerful stuff. I'll have to read into Postgres' implementation of these things. Interesting also to see a reference to a SQL:1999 standard as far as type inheritance is concerned. That's certainly something worth looking into. From what I understand, Postgres just "hides" a foreign key relationship between cities and capitals behind the notion of one table inheriting from another? Cheers Lukas 2011/6/30 Sander Plas <[email protected]>: > Hi Lukas & others, > > I accidentally found this in the PostgreSQL docs: > http://www.postgresql.org/docs/current/static/ddl-inherit.html > > Never used it, but i think it looks interesting. This seems to allow > inheritance in the database without the need for any "ORM magic" in > the Java domain. > > To do anything useful with this in jOOQ, the inheritance hierarchy > would need to be reflected in the generated Table and Record classes > though, and some tricks would probably be required to allow casting > between super and sub types. > > Just curious what you think about this.. > > Sander
