On Apr 20, 5:34 pm, Fearless Fool <[email protected]> wrote:
> So (apologies to Fred) this may be deeper than I thought: How does a
> HABTM table EVER get updated?  From the Rails 1.9.1
> active_record/base.rb sources, update_attributes => save =>
> create_or_update => update.  The sources for update():
>
[snip]
> Sure enough, it appears to depend on some sort of 'id' -- what is the
> primary_key column name for HABTM tables?  Or am off in the weeds?
>

for a normal HABTM there is no corresponding model, so rows never get
updated by this code path. The habtm association generates sql
fragments directly and runs them
Furthermore, because habtm is usually used as a  'dumb' join table,
it's only ever a question of deleting or inserting rows

Fred
> --
> Posted viahttp://www.ruby-forum.com/.
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to