2013/10/15 Peter Cooner <[email protected]> > Honestly PG inheritance was pretty bad in 8.X, and only started to rock in > 9.X, I'm thinking there isn't a lot of real multiple inheritance in use out > there (that doesn't mean there won't be of course). >
Well, a good use case that I could see is to define something mixin types for very common attribute sets, such as DATE_CREATED, DATE_MODIFIED, USER_CREATED, USER_MODIFIED. Such attributes could be declared in a base table / type and then inherited by all relevant tables, which can also inherit from other structures. I'm not particularly experienced with such an ORDBMS way of thinking, but it would certainly be interesting to experiment with that. Anyway, I'm wondering if maybe some of those mapping functions in JOOQ > couldn't be the best solution? My brain is fuzzy on the topic, but aren't > the values are kept in a store, might there be a "fast" way to map between > one table type and another? Maybe some sort of internal JOOQ table hinting > would allow for quicker mapping, or re-typing as the case might be... > What do you mean by "those mapping functions" ? > Just spit balling. > > > > > On Tue, Oct 15, 2013 at 9:36 AM, Lukas Eder <[email protected]> wrote: > >> I'm currently looking into supporting PostgreSQL's table inheritance in >> jOOQ's code generator. PostgreSQL also supports multiple inheritance, e.g: >> >> CREATE TABLE t_inheritance_all ( >> text_1_all text >> ) INHERITS (t_inheritance_1_1, t_inheritance_1_2) >> >> >> This cannot be mapped to Java very easily. I would say that such >> relationships would not be reflected in the generated code, and a warning >> would be issued by the code generator. >> >> Does anyone on this list have any experience with multiple inheritance in >> PostgreSQL? >> >> Cheers >> Lukas >> >> >> 2013/10/10 Jason Dusek <[email protected]> >> >>> When a Postgres table has other tables that inherit from, a SELECT >>> against the parent will show rows in all the children, as well. The >>> antidote to this is the ONLY keyword: >>> >>> SELECT * FROM ONLY <name-of-parent-table> >>> >>> Is inheritance recognized by jOOQ? Are there options for making ONLY the >>> default for different models/tables? >>> >>> -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
