Top "Single-table-inheritance" questions

Single table inheritance is the simplest of several ways to design SQL tables that reflect a class/subclass or generalization/specialization relationship.

Hibernate, single table inheritance and using field from superclass as discriminator column

I have following kinds of classes for hibernate entity hierarchy. I am trying to have two concrete sub classes Sub1…

java hibernate single-table-inheritance
Best practices to handle routes for STI subclasses in rails

My Rails views and controllers are littered with redirect_to, link_to, and form_for method calls. Sometimes link_to …

ruby-on-rails ruby single-table-inheritance
Rails -- use type column without STI?

I want to use a column called type without invoking Single Table Inheritance (STI) - I just want type to …

ruby-on-rails ruby-on-rails-3 single-table-inheritance
Hibernate: Parent/Child relationship in a single-table

I hardly see any pointer on the following problem related to Hibernate. This pertains to implementing inheritance using a single …

java hibernate orm single-table-inheritance
How to get the DiscriminatorValue at run time

We have the following classes @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) // optional annotation as this is default @DiscriminatorColumn(name = "apType", …

java hibernate inheritance jpa single-table-inheritance
Twig instanceof for inheritance objects

I am using the following feature from propel http://www.propelorm.org/documentation/09-inheritance.html. I am also using Symfony2 …

symfony propel twig single-table-inheritance
How to cast an ActiveRecord object to another class when using STI?

I'm currently using ActiveRecord single table inheritance. How can I cast one of my models from type A to B? …

ruby-on-rails ruby activerecord casting single-table-inheritance
Changing type of ActiveRecord Class in Rails with Single Table Inheritance

I have two types of classes: BaseUser < ActiveRecord::Base and User < BaseUser which acts_as_authentic using Authlogic's …

ruby-on-rails ruby activerecord single-table-inheritance
Is it possible to create a conditional association in model?

I have setup a role based access controll system with the following models: Role (as STI), UserRole (global roles) ProjectRole (…

ruby-on-rails conditional has-many polymorphic-associations single-table-inheritance
Hibernate: org.hibernate.WrongClassException, SINGLE_TABLE inheritance and DiscriminatorFormula

I'm using Hibernate 3.2.2 GA with HSQLDB 2.0 GA, and I have a class hierarchy similar to the following: @Entity @Table(name = "…

java hibernate hsqldb single-table-inheritance