single-table-inheritance
Can nested attributes be used in combination with inheritance?
I have the following classes: Project Person Person > Developer Person > Manager In the Project model I have added the following statements:[详细]
2022-12-25 01:18 分类:问答Rails single table inheritance/subclass find condition in parent
I have a table called Users (class User < ActiveRecord::Base) and a subclass/STI of it for Clients (class Client < User).[详细]
2022-12-24 19:52 分类:问答Virgin STI Help
I am working on a horse racing application and I\'m trying to utilize STI to model a horse\'s connections. A horse\'s connections is comprised of his owner, trainer and jockey. Over time, connections[详细]
2022-12-23 21:28 分类:问答mongo mapper with STI with more than one type?
I have a series of models all which inherit from a base model Properties For ex开发者_如何学Goample Bars, Restaurants, Cafes, etc.[详细]
2022-12-23 04:32 分类:问答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 database table with a parent-child[详细]
2022-12-23 01:25 分类:问答Avoiding STI in Rails
class User < ActiveRecord::Base has_one :location, :dependent => :destroy, :as => :locatable has_one :ideal_location, :dependent => :destroy, :as => :locatable[详细]
2022-12-20 23:32 分类:问答TypeError when trying to use observers and STI
I\'m trying to follow along with the thread on implementing an achievement system (located at How to implement an achievement system in RoR), and am running into a TypeError when the object is saved a[详细]
2022-12-20 15:40 分类:问答Different routes but using the same controller for model subclasses in Rails
I have a Model Property which has subclasses using STI, and which I would like all to use the same controller with only different view partials de开发者_高级运维pending on the subclass.[详细]
2022-12-20 14:48 分类:问答Saving and retrieving inherited types with LINQtoSQL and Business Objects
I have an abstract EventBase class and some inherited event types, along with an Event class.Each event type has its own unique columns.[详细]
2022-12-20 07:28 分类:问答Spring: controller inheritance using @Controller annotation
I\'d like to be able to create a base controller in my Spring app that, among other things, determines if a user is a registered user or not.This base controller, following the template design pattern[详细]
2022-12-18 00:45 分类:问答