similar to: Composite Observations Model pattern

Displaying 20 results from an estimated 11000 matches similar to: "Composite Observations Model pattern"

2011 Jul 08
0
Looking for Help/Advice on StackOverflow Question - Polymorphic Association with STI
I am having trouble with an many to many polymorphic association with STI involved. The problem is described clearly in the following StackOverflow question, so I will leave this thread short: http://stackoverflow.com/questions/6582074/activerecord-has-many-through-polymorphic-associations-with-sti I am posting here hoping to get advice/direction/a solution for this, as I''ve so far been
2008 May 13
0
Polymorphic naming difficulties
Hi all. I''m having a problem naming a polymorphic relationship. Here''s my thinking... First, an analogy. You''re walking through the mall. Through a window you see a game you''re interested. I''m attempting to model the relationship between your interest and the game you''re interested in. I have an InterestList. It''s job is to maintain
2006 May 14
2
object class with STI and Polymorphic Assoc''s.
Hi, lets say I have a a table, "Linkings" that I am using for polymorphic associations. One of the associations is to the "person" table, and there are several other associations. "Person" has 2 types, "slacker" and "suckup". It is modelled as such: class Linking < ActiveRecord::Base belongs_to :person belongs_to :linkable, :polymorphic
2006 Sep 22
2
possible to create polymorphic relationship with STI models?
I would like to associate a ‘product’ model with 3 models inherited from ‘image’: part, action and accessory. I have it working with Has_many :through relating products to images through attachments, I then have to determine the ‘type’ of the STI extension. This means i have to go product.images. While this is ok, i can see it getting tricky when i want to go products.images <<
2010 May 07
1
Can't eagerly load a polymorphic association defined in an STI parent class?
If I define an association (in my case a polymorphic one) in an STI parent class, and try to eagerly load it in a subclass, I get the following error: ActiveRecord::ConfigurationError: Association name ''myassoc'' was not found; perhaps you misspelled it? If I redefine the same association again in the STI subclass, it works. Is this a bug or what? -- You received this message
2006 Feb 09
2
Polymorphic Associations
If anybody on edge familiar with this could help, that would be "great" :) I have different types of things I want to be "reviewable". So, instead of having a slew of HABTM... this new Polymorphic Associations schtick seemed like the best solution. I have everything setup as I thought it should be (so I think)... but it doesn''t appear to be working correctly. Here
2006 Jun 17
5
STI versus Composition...or the headaches of one big table
Guys, I have a relationship between model classes that I believe is best represented by inheritance, but the likelihood that things will change often is driving us to composition instead. So, I have a class called Autos, and subclasses called Suvs, Minis, Mids, Sports, for example. We have been requested to avoid the STI approach to this, because of fear of a quickly growing table with
2011 May 03
2
Database performance for polymorphic associations under high load
Hey guys, I''ve been thinking lately about polymorphic associations, and I wonder: is there a noticeable or tangible performance "hit" from doing polymorphic associations when you''ve got your database under really high query load? So for example, maybe I have a "message" model, a "user" model and an "administrator" model, without any
2007 Aug 02
2
STI functionality, but then with multiple tables
Hello, I''m creating my own Tumblr [tumblr.com] like rails app. It''s like a blog, but in this case a blog post could be of a certain type, i.e. a regular post, a video, a link, a photo, a song(info). Well now, it''s clear that they share a lot of similar functionality: title, created_at/updated_at, commentable, probably has an author_id, etc.. But besides that they are
2007 Oct 27
0
STI vs Polymorphic Associations
I have a MasterEvent model. It has attributes that is required by another model Event. The user selects the MasterEvent model and I create the Event model by merging the attributes of the selected MasterEvent with the attributes that were presented for the Event model in the form. I have association declarations in the MasterEvent and Event models. If I use STI does the subclasses inherit the
2011 Apr 05
1
Why does AR use base_class for polymorphic relationship "type"
I have a couple models that inherit from a base class that then inherits from AR. When they are used in a polymorphic relationship the "type" is always the base class. Just curious if anyone has a reason why it doesn''t use the *actual* class rather then the base_class. I have patched AR to use the actual class if !base_class.table_exists? but it adds another query each time
2006 Mar 08
0
combining STI + polymorphism + rich self HABTM : how to ?
Hi all, I need to model simple typed polymorphic relations: ''John'' [''works_for''] ''Bill'' ''John'' [''speaks_for''] ''Microsoft'' ''Microsoft'' [''hold_shares_of''] ''Apple'' I''m having a hard time combining : - S.T.I.
2010 Jul 09
1
STI vs Polymoric
Hi all, I am also which one will be better STI or polymorphic for my app. thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2009 Nov 01
2
CentOS Mirrored On RapidShare [Links Here]
Hey List, Firstly I am sorry for the length of this email and that you are all having too receive it but the point is that this email will now go into the archive and be indexed by Google (hopefully) and thusly, people will be able to find these links through Google. My goal is to mirror CentOS on RapidShare. "Why you fool there are loads of mirrors?" you might ask; simply for
2007 Aug 22
1
Interface for administration
Hi *, I need to choose a platform for building the administrative part of http://www.zooppa.com Actually I like both streamlined and activescaffold, they seem both good. I''d like to ask to people using it which one is more likely to manage correctly things like validations, polymorphic associations, STI and in general complex data. If it''s also easy to modify it would
2006 Feb 28
3
Composite Key Support
Right now rails doesn''t support composite keys, that is id1, id2, and id3 are in the primary key of the table. Does anyone know if this is being discussed for future versions, or is it pretty much out of scope? -- Posted via http://www.ruby-forum.com/.
2011 Jul 20
2
polymorphic assoc seems only best for multiple parents ?
I have done a little polymorphic associations stuff and have refreshed my memory on it again. What it seems like is that if I have a particular record and I want to make it easy for many different parent records to associate with it using has_one or has_many, that is fine. If I want a parent record to have multiple kinds of children through one association, I don''t see how to do that
2008 May 12
0
Problems with form_for, STI, and polymorphic routing
I''m stumped on how to get past this. It''s Rails 2.0.2. I have a class, Show. Using STI, I''m using that as a base class, and have DayShow and NightShow that inherit from it. ### class Show < ActiveRecord::Base end class DayShow < Show end ### In my shows/edit.html.erb, I have: <% form_for(@show) do |f| %> However, when I use it with a @show that has
2009 Dec 08
0
Tutorial: Install and Setup cwRsync on Windows
Hi, I have received a number of requests to make available the video footage about cwRsync on Rapidshare. The links are below: http://rapidshare.com/files/317951882/Setup_And_Install_RSync.part01.rar http://rapidshare.com/files/317953422/Setup_And_Install_RSync.part02.rar http://rapidshare.com/files/317955788/Setup_And_Install_RSync.part03.rar
2006 Jul 26
3
Polymorphic Association with Single Table Inheritance?
Hello, is it possible to setup a model/table schema like this: Groupable --> Membership <-- Group ^ ^ | | User UserGroup I tried the following but failed: Groupable (table with ''type'' column) has_many :memberships, :as => :groupable has_many :groups, :through => :memberships