From: Pit Capitain Date: 2006-06-28T23:23:15+09:00 Subject: Re: How to model Hibernate multi-table inheritance with ActiveRecord? Marcus Andersson schrieb: > I have this "old" database mainly modeled for Hibernate. The java model > has something called Asset. Asset is inherited by SomeAsset and > AnotherAsset and the similar stuff is in the asset table and the > specific data for SomeAsset is in table some_asset and for AnotherAsset > in another_asset. This is then reflected in hibernate using a > element. > > What would be the best way to model this in ActiveRecord? I cannot > change the exisiting database structure beyond adding new columns (ie I > cannot move values from the join tables back to the main table and use > STI). I don't know ActiveRecord, but are you allowed to add a (SQL) view to your database schema? This way you might be able to use single table inheritance. Some databases allow even DML Operations on views. Regards, Pit